Skip to content

Instantly share code, notes, and snippets.

View leongaban's full-sized avatar

Leon Gaban leongaban

View GitHub Profile
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot 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;
@leongaban
leongaban / gup.js
Created March 3, 2016 20:16
Get variable from URL param
// For url with ?search=param
// http://stackoverflow.com/a/979997/168738
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];
{
"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,
@marcbachmann
marcbachmann / .hyperterm.js
Last active January 10, 2024 06:58
hyperterm config
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)',
@leongaban
leongaban / RamdaGetKeyName.js
Created September 7, 2016 16:30
Get name of key that is true
let tabs = {
twitter: true,
news: false,
blogs: false,
finNews: false
}
const isTrue = R.equals(true);
const getActive = R.filter(isTrue);