Skip to content

Instantly share code, notes, and snippets.

View equinusocio's full-sized avatar
:octocat:
Something went wrong. Try again🁢

Mattia Astorino equinusocio

:octocat:
Something went wrong. Try again🁢
View GitHub Profile
@equinusocio
equinusocio / git.sh
Created October 19, 2020 12:23 — forked from simon04/git.sh
Git merge/replace orphan branch into master
git checkout --orphan new-framework
# completely rewrite your application in new framework
git merge --strategy=ours --allow-unrelated-histories master
git commit-tree -p HEAD^2 -p HEAD^1 -m "Merge branch 'new-framework'" "HEAD^{tree}"
git reset --hard $OUTPUT_FROM_PREVIOUS_COMMAND
git checkout master
git merge --ff-only new-framework
@equinusocio
equinusocio / postcss-build.js
Created December 4, 2017 15:53 — forked from LasaleFamine/postcss-build.js
Building postcss files.
const fs = require('fs-extra');
const postcss = require('postcss');
const postcssrc = require('postcss-load-config');
const folder = './folder/';
const outputFolder = './out';
const run = async () => {
const files = await fs.readdir(folder);
@equinusocio
equinusocio / purge_node.txt
Last active November 6, 2018 08:04 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# First:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
#go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*