Skip to content

Instantly share code, notes, and snippets.


Leon Gaban leongaban

Block or report user

Report or block leongaban

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
leongaban / RamdaGetKeyName.js
Created Sep 7, 2016
Get name of key that is true
View RamdaGetKeyName.js
let tabs = {
twitter: true,
news: false,
blogs: false,
finNews: false
const isTrue = R.equals(true);
const getActive = R.filter(isTrue);
marcbachmann / .hyperterm.js
Last active Dec 22, 2018
hyperterm config
View .hyperterm.js
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12.5,
// font family with optional fallbacks
fontFamily: '"Meslo LG S for Powerline", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color (hex)
cursorColor: 'rgba(255,255,255,.4)',
View My Sublime 3 settings
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Oceanic Next Color Scheme/Oceanic Next.tmTheme",
"draw_white_space": "all",
"font_face": "Fira Mono",
"font_size": 20,
"tab_size": 2,
"theme": "Brogrammer.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
leongaban / gup.js
Created Mar 3, 2016
Get variable from URL param
View gup.js
// For url with ?search=param
function gurlp( name, url ) {
if (!url) url = location.href;
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( url );
return results == null ? null : results[1];
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
NodeList.prototype.__proto__ = Array.prototype;
tonymtz / gist:d75101d9bdf764c890ef
Last active Sep 12, 2019
Uninstall nodejs from OSX Yosemite
View gist:d75101d9bdf764c890ef
# first:
lsbom -f -l -s -pf /var/db/receipts/ | 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*
paulakreuger / angular-filters.js
Last active Apr 19, 2019
Capitalize First Letter Filter - AngularJS
View angular-filters.js
app.filter('capitalize', function() {
return function(input, scope) {
if (input!=null)
input = input.toLowerCase();
return input.substring(0,1).toUpperCase()+input.substring(1);
demisx /
Last active Aug 21, 2019
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes


dypsilon /
Last active Sep 18, 2019
A badass list of frontend development resources I collected over time.
phette23 /
Last active Sep 23, 2019
Set the iTerm tab title to the current directory, not full path.
# put this in your .bash_profile
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
# Piece-by-Piece Explanation:
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too
# the $PROMPT_COMMAND environment variable is executed every time a command is run
# see:
You can’t perform that action at this time.