Skip to content

Instantly share code, notes, and snippets.

View leolanese's full-sized avatar
💻
[] === []; // false ¯\_(ツ)_/¯

Leo Lanese leolanese

💻
[] === []; // false ¯\_(ツ)_/¯
View GitHub Profile
@leolanese
leolanese / KO_chetsheet.css
Created March 12, 2014 23:49
Knockout built-in Bindings Quick Reference
html, body{
margin:0;
padding:0;
height:100%;
}
section {
position: relative;
border: 1px solid #000;
padding-top: 37px;
background: #500;
@leolanese
leolanese / lynx_install
Created March 13, 2014 09:40
Lynx on Maverick
##
## http://lynx.isc.org/
##
cd /usr/local/src
curl -O http://lynx.isc.org/lynx2.8.7/lynx2.8.7.tar.gz
tar -xzvf lynx2.8.7.tar.gz
cd lynx2-8-7
./configure --mandir=/usr/share/man
make
@leolanese
leolanese / gist:da20c39d9c8962fbf52e
Created July 8, 2014 11:19
DiffMerge merging tool: Installation and configuration for GIT
// Download and install your version from: https://sourcegear.com/diffmerge/
// run these commands on the terminal
git config --global merge.tool diffmerge
git config --global mergetool.diffmerge.cmd "sgdm --merge --result=\$MERGED \$LOCAL \$BASE \$REMOTE"
git config --global mergetool.diffmerge.trustExitCode true
Sharing simple trick that I'm using for debuggin everyday:
0- Fluid(s)
img,object,video,embed {
max-width: 100%;
}
--
1- use Pesticide plugin:
@leolanese
leolanese / gist:72dbf4ff24b40b8385b7
Last active August 29, 2015 14:04
NodeJS http-server
// install the node http-server server
npm -g install http-server
// run this server:
http-server
// get the process that has bound to the required port
lsof -Pi | grep LISTEN
...
node 18740 Leo 12u IPv4 0xaf78c883a32c84bf 0t0 TCP *:8081 (LISTEN)
@leolanese
leolanese / gist:36fe3879dd7b97c9f63f
Created September 9, 2015 14:31
a betterTypeOf
var betterTypeOf = function(obj) {
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
}
/*
betterTypeOf(null); // null
betterTypeOf(NaN); // number
betterTypeOf({a: 4}); //"object"
betterTypeOf([1, 2, 3]); //"array"
(function() {console.log(toType(arguments))})(); //arguments
@leolanese
leolanese / dabblet.css
Created November 3, 2013 20:26
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@leolanese
leolanese / dabblet.css
Created November 3, 2013 20:26
Untitled
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@leolanese
leolanese / dabblet.html
Created November 3, 2013 20:27
Untitled
<!-- content to be placed inside <body>…</body> -->
@leolanese
leolanese / dabblet.css
Created November 3, 2013 20:27
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;