Skip to content

Instantly share code, notes, and snippets.

View armand1m's full-sized avatar

Armando Magalhães armand1m

View GitHub Profile
@armand1m
armand1m / chugster-12.xml
Created November 30, 2022 00:49
petrucci neuraldsp archetype preset
neural_dsp_petruccieditorSizeroutingtempo ���b@presetNamePropchugster -12presetPathPropL/Library/Audio/Presets/Neural DSP/Archetype Petrucci/User/chugster -12.xmlpresetUIDProp �����b�presetVersionProp1.0.0PARAMid ampTypevalue @PARAMid ampsActivevalue �?PARAMid cab1Activevalue �?PARAMidcab1Distancevalue PARAMid cab1Levelvalue &�PARAMid cab1MicIRvalue @PARAMid cab1Panvalue PARAMid cab1Phasevalue PARAMidcab1Positionvalue PARAMid cab2Activevalue �?PARAMidcab2Distancevalue `b�?PARAMid cab2Levelvalue ���&�PARAMid cab2MicIRvalue @PARAMid cab2Panvalue �z�?PARAMid cab2Phasevalue PARAMidcab2Positionvalue �A`�?PARAMidcabSectionActivevalue �?PARAMidchorus2Activevalue 
@armand1m
armand1m / bit-is-odd.js
Created March 26, 2022 10:41
isOdd function implemented using bitwise comparison in js
export const isOdd = (num) => Boolean(num & 0x01);
@armand1m
armand1m / prepare-ts-node-project.sh
Created March 20, 2022 15:45
prepares a typescript node project
#!/bin/sh
curl -SLsf https://go.d1m.dev/installjest | sh
curl -SLsf https://go.d1m.dev/installprettier | sh
curl -SLsf https://go.d1m.dev/installts | sh
curl -SLsf https://go.d1m.dev/installtsnodemon | sh
syntax on " enable syntax highlighting
set cursorline " highlight the current line
set ruler " show line number in bar
set nobackup " don't create pointless backup files; Use VCS instead
set autoread " watch for file changes
set number " show line numbers
set showcmd " show selection metadata
set showmode " show INSERT, VISUAL, etc. mode
set autoindent smartindent " auto/smart indent
set smarttab " better backspace and tab functionality
@armand1m
armand1m / install-ts-nodemon.sh
Created October 27, 2020 17:47
adds nodemon and ts-node
yarn add -D nodemon ts-node
npx add-project-script -n "dev" -v "nodemon --watch 'src/**/*.ts' --ignore 'src/**/*.spec.ts' --exec 'ts-node' src/index.ts"
@armand1m
armand1m / install-jest.sh
Created October 27, 2020 17:43
Install and setup jest
yarn add -D jest @types/jest
npx add-project-script -n "test" -v "jest"
npx add-project-script -n "test:watch" -v "jest --watch"
npx add-project-script -n "test:coverage" -v "jest --coverage"
@armand1m
armand1m / install-ts.sh
Last active August 29, 2021 13:23
Install typescript in a node project
# Use the following command to run this code in your computer:
# curl -SLsf https://go.d1m.dev/installts | sh
yarn add -D typescript @types/node
yarn add tslib
cat > ./tsconfig.json <<EOL
{
"compilerOptions": {
"pretty": true,
"strict": true,
@armand1m
armand1m / theme.ts
Created July 13, 2020 17:03
my theme-ui theming config
// @ts-ignore
import {base, dark} from '@theme-ui/presets';
export const theme = {
...base,
initialColorModeName: 'light',
useColorSchemeMediaQuery: true,
fontSizes: [
'0.75em',
'0.875em',
@armand1m
armand1m / .skhdrc
Last active May 2, 2024 18:00
⚙️ My yabai and skhd configuration files.
# open terminal
cmd - return : open -n -a "Terminal"
# open chrome
cmd + shift - return : open -n -a "Google Chrome"
# moves focus between windows in the current focused display
alt - h : yabai -m window --focus west
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
@armand1m
armand1m / fix-stale-drone-stage.sql
Last active March 4, 2020 14:22
Fixes a stale drone stage state in Drone CI database directly.
-- You can use either 'error', 'failure' or 'success' as a status on each of these.
UPDATE stages SET stage_status = 'success' WHERE stage_id = $stage_id;
UPDATE builds SET build_status = 'success' WHERE build_id = $build_id;
UPDATE steps SET step_status = 'success' WHERE step_id = $step_id;
-- This timestamp must be bigger than the step_started field of the steps table.
UPDATE steps SET step_stopped = 1583330000 WHERE step_id = $step_id;