This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Following the guide found at this page | |
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
echo "\r\nUpdating system ...\r\n" | |
sudo apt-get update | |
# Create folder to place selenium in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
============================================== | |
CSS3 ANIMATION CHEAT SHEET | |
============================================== | |
Made by Justin Aguilar | |
www.justinaguilar.com/animations/ | |
Questions, comments, concerns, love letters: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hello(name, age) { | |
alert("Hello "+name+", you’re "+age+" years old!"); | |
} | |
hello("Anon", 42); // "hello Anon, you’re 42 years old!" | |
hello("Baptiste"); // "hello Baptiste, you’re undefined years old!" | |
hello("Bulat", 24, 42); // "hello Bulat, you’re 24 years old! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foo() { | |
function a() {} // local 'a' is a function | |
a = 12; // local 'a' is now a number (12) | |
return a; // return the local 'a' (12) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = 42; | |
function foo() { | |
a = 12; | |
return a; | |
function a(){} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = 2; | |
function foo() { | |
var a; // 'a' declaration is moved to top | |
return a; | |
a = 5; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = 2; | |
function foo() { | |
return a; | |
var a = 5; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = {}, b = {}; | |
a.foo = 42; | |
b.foo = 18; | |
a.alertFoo = function() { alert(this.foo); }; | |
a.alertFoo(); // 42 | |
a.alertFoo.call(b); // 18 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setGlobal() { | |
a = 42; | |
} | |
function setLocal() { | |
var b = 23; | |
} | |
setGlobal(); | |
alert(a); // 42 | |
setLocal(); | |
alert(b); // ReferenceError: b is not defined |