Skip to content

Instantly share code, notes, and snippets.

View markterence's full-sized avatar
💻
Open to work – Full-Stack/Web/Software Developer

Mark Terence Tiglao markterence

💻
Open to work – Full-Stack/Web/Software Developer
  • Earth, Asia/Manila
  • 09:41 (UTC +08:00)
View GitHub Profile
@markterence
markterence / nuxt-config.md
Last active February 11, 2026 07:09
Nuxt Config Environment Overrides

Nuxt Config Environment Overrides

I came across a problem when trying to set up local-only configuration in a Nuxt application. These local Nuxt config are not simply environment variables, but rather configuration that overrides specific Nuxt settings (like ports, proxies, dev server options) that may not be needed to be included to version control.

The official Nuxt documentation mentions environment-specific overrides using $development and $production keys, but these are still within the committed nuxt.config.ts file.

https://nuxt.com/docs/4.x/getting-started/configuration#environment-overrides

However, this doesn't solve the problem of having local-only configuration, we could import a config file that is gitignored and put it on per-environment overrides, but if we do that, it would fail in CI/CD pipelines where the file doesn't exist and it's not even necessary to have it there just make the build work on CI/CD. (I hope that makes sense)

@markterence
markterence / ffmpeg-compress-mp4
Created March 29, 2024 13:02 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@markterence
markterence / parseCsv.example.js
Last active November 8, 2023 06:51
Parse CSV example
const fs = require('fs');
// Read the CSV file
const data = fs.readFileSync('Untitled spreadsheet - Sheet1.csv', 'utf8');
const parseCsv = (csv) => {
// Split the CSV data into lines
const lines = csv.split('\n');
// Split the first line to get the headers, and trim each header
@markterence
markterence / pulse audio.md
Created September 9, 2020 00:28
pulse audio
@markterence
markterence / UserController.spec.js
Created July 9, 2019 05:04
UserController Test using supertest, mocha, and jest's matchers.
const request = require('supertest');
const expect = require('expect');
describe('User Controller', () => {
var user;
before(async () => {
await Users.create({
username: 'testuser1',
password: 'testuser1',
@markterence
markterence / React Native (Android) - Rename applicationID, package name.md
Created April 30, 2018 10:37
React Native (Android) - [ Changing application package name/bundle identifier ]

React Native (Android) - [ Changing application package name/bundle identifier ]

List of files to edit to change/rename your react-native android project. The following constants are used in the files to denote what kind of value should be placed.

  • APPLICATION_NAME - this will be used by react-native to identify your application. (settings.gradle, MainActivity.java, etc.)
  • APPLICATION_DISPLAY_NAME - display name in Android Home Screen.
  • ANDROID_PACKAGE_NAME - A valid android package name.
### Keybase proof
I hereby claim:
* I am markterence on github.
* I am coffeekitkat (https://keybase.io/coffeekitkat) on keybase.
* I have a public key ASBjFRg6Z8syIcQdpoIN4puVj-RXo6S-p8qNjQkP79VoJgo
To claim this, I am signing this object:
@markterence
markterence / code-snippet.js
Created December 15, 2017 06:03
simple usage of exec in node js
// http://nodejs.org/api.html#_child_processes
//Sample1
var sys = require('sys')
var exec = require('child_process').exec;
var child;
// executes `pwd`
child = exec("pwd", function (error, stdout, stderr) {
sys.print('stdout: ' + stdout);