Skip to content

Instantly share code, notes, and snippets.

View antoniopresto's full-sized avatar

antoniopresto

  • São Paulo - Brasil
View GitHub Profile
@adrienjoly
adrienjoly / fix-dyld-missing-symbol-called-errors-on-m1-macs.md
Last active October 17, 2024 07:18
Fix `dyld[]: missing symbol called` errors when running Node.js programs on M1 Macs (apple silicon)

Problem

If you're getting this kind of error when running Node.js programs with binary dependencies that don't support M1 yet, e.g.:

$ yarn test
dyld[51175]: missing symbol called
dyld[51176]: missing symbol called
@antoniopresto
antoniopresto / kp
Last active May 25, 2021 12:14
Kill process
# kp 3000 node # kill if node is running on port 3000
# kp 3000 # kill process running on port 3000
PORT=$1;
MATCH=$2;
if [ -n "$MATCH" ]; then
kill -9 `lsof -i :$PORT | awk -v MATCH=$2 '$0 ~ MATCH{ print $2; }'`
exit;
fi;
@agarwalparas
agarwalparas / gist:d355a950148702cc7ba82abc4d1943bf
Created November 3, 2017 04:06
Recover Force Push on Github
# First, you must get the previous commit sha, the one before the forced push:
## Hit through terminal
curl -u <username> https://api.github.com/repos/:owner/:repo/events
# Then you can create a branch from this sha:
## Hit through terminal
curl -u <github-username> -X POST -d '{"ref":"refs/heads/<new-branch-name>", "sha":"<sha-from-step-1>"}' https://api.github.com/repos/:owner/:repo/git/refs
@milanboers
milanboers / clone.bash
Last active September 12, 2024 11:52
Clone all repositories of a Github user
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone
@Eomerx
Eomerx / lessmixins.less
Created August 15, 2014 12:45
less mixins
//---------------------------------------------------
// LESS Prefixer
//---------------------------------------------------
//
// All of the CSS3 fun, none of the prefixes!
//
// As a rule, you can use the CSS properties you
// would expect just by adding a '.':
//
// box-shadow => .box-shadow(@args)
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//