This file contains 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() { | |
var movieLists = [ | |
{ | |
name: "New Releases", | |
videos: [ | |
{ | |
"id": 70111470, | |
"title": "Die Hard", | |
"boxart": "http://cdn-0.nflximg.com/images/2891/DieHard.jpg", | |
"uri": "http://api.netflix.com/catalog/titles/movies/70111470", |
This file contains 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() { | |
var movieLists = [ | |
{ | |
name: "New Releases", | |
videos: [ | |
{ | |
"id": 70111470, | |
"title": "Die Hard", | |
"boxarts": [ | |
{ width: 150, height:200, url:"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg" }, |
This file contains 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() { | |
var movieLists = [ | |
{ | |
name: "New Releases", | |
videos: [ | |
{ | |
"id": 70111470, | |
"title": "Die Hard", | |
"boxarts": [ | |
{ width: 150, height:200, url:"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg" }, |
This file contains 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() { | |
var lists = [ | |
{ | |
"id": 5434364, | |
"name": "New Releases" | |
}, | |
{ | |
"id": 65456475, | |
name: "Thrillers" | |
} |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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 tenDaysAgo = new Date( now.getFullYear(), now.getMonth(), now.getDate() - 10); // Negative date works !! | |
var negativeDate = new Date(2015, 10, -1); // 30 Octobre 2015 | |
var elappsedTime = Date.now() - tenDaysAgo; // Soustraire deux dates utilisent automatiquement les timeStamps |
This file contains 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
@keyframes dropball { | |
0% { | |
bottom: 200px; | |
} | |
2% { | |
bottom: 198.89046144485474px; | |
} | |
4% { | |
bottom: 197.5577425956726px; | |
} |
This file contains 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 numberOne = +'1'; // 1 |
This file contains 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
DECLARE | |
statements CURSOR FOR | |
SELECT tablename FROM pg_tables | |
WHERE schemaname = 'public'; | |
BEGIN | |
FOR stmt IN statements LOOP | |
EXECUTE 'TRUNCATE TABLE ' || quote_ident(stmt.tablename) || ' CASCADE;'; | |
EXECUTE 'ALTER SEQUENCE ' || quote_ident('' || stmt.tablename || '_id_seq') || ' RESTART WITH 1'; | |
END LOOP; | |
END; |
This file contains 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
from tempfile import NamedTemporaryFile, TemporaryDirectory | |
def compose(g, f): | |
"""Right to left function composition.""" | |
return lambda *args, **kwargs: g(f(*args, **kwargs)) | |
def temporarify(action, directory=False): | |
""" |
OlderNewer