Skip to content

Instantly share code, notes, and snippets.

View alexrdz's full-sized avatar
🎥
working

alex rodriguez alexrdz

🎥
working
View GitHub Profile
@alexrdz
alexrdz / gist:d699416518e87fd235348e24b4c60839
Created May 10, 2018 14:15
Quick Comment Toggle in JS
//*
someCode();
/*/
someOtherCode();
//*/
// let test = null
// console.log(test) // returns null
// console.log(!!test) // returns false
function isEmpty(obj) {
for(var key in obj) {
if(obj.hasOwnProperty(key))
return false;
}
return true;
}
@alexrdz
alexrdz / gist:cd98010c8ba0adf538affc6cf550b873
Created April 27, 2018 19:34
remove all node_modules folders from a given directory
// cd into directory
find . -name "node_modules" -exec rm -rf '{}' +
@alexrdz
alexrdz / nuxt.config.js
Created March 13, 2018 18:40
nuxt config with tailwindcss and purgecss
/*
** requires the following packages:
** npm i -D glob-all
** npm i -D purgecss-webpack-plugin
*/
const pkg = require('./package')
const path = require('path')
const PurgecssPlugin = require('purgecss-webpack-plugin')
const glob = require('glob-all')
@alexrdz
alexrdz / gist:fc7468cbf44ae77ae988dc7e2d7a0c47
Created February 23, 2018 05:47
View all globabally installed npm packages
npm list -g --depth=0
@alexrdz
alexrdz / gist:9760b281d2e3f318d4897fc62e8f835e
Created February 22, 2018 17:33
make alias for prettier git logs - git lg
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
// don't forget
$ ssh-add -l
// or
$ ssh-add ~/.ssh/identity
npm r pkgname -g
@alexrdz
alexrdz / unink
Created July 22, 2017 20:51
remove global npm package installed via `npm lin`
npm r tmcli -g