These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.
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
| #!/usr/bin/env python2 | |
| """ | |
| Author: takeshix <[email protected]> | |
| PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]). | |
| Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP. | |
| """ | |
| import sys,struct,socket | |
| from argparse import ArgumentParser |
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
| cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git |
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
| // Today, I noticed that someone favorited this tweet of mine from 2012: | |
| // https://twitter.com/cowboy/status/232587756486938624 | |
| // !function $(){console.log('!'+$+'()')}() #quine | |
| // So I fooled around for a little bit: | |
| // Shortest JavaScript quine? | |
| (function _(){return'('+_+')()'})() | |
| // Have fun with this one! |
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
| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |
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 | |
| # WARNING: to use "--binary-images hdd", see this bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773833 | |
| # WARNING: to get persistence encryption working, apply this fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767195 | |
| # Italian locale & keyboard, default boot with luks encrypted persistence | |
| lb config --distribution jessie --debian-installer live --binary-images iso-hybrid --archive-areas "main contrib non-free" --bootappend-live "boot=live persistence persistence-encryption=luks locales=it_IT.UTF-8 keyboard-layouts=it username=utente hostname=D8" | |
| # English locale & italian keyboard, default boot with luks encrypted persistence | |
| #lb config --distribution jessie --debian-installer live --binary-images iso-hybrid --archive-areas "main contrib non-free" --bootappend-live "boot=live persistence persistence-encryption=luks keyboard-layouts=it username=user hostname=D8" |
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
| #!/usr/bin/python | |
| # License for any modification to the original (linked below): | |
| # ---------------------------------------------------------------------------- | |
| # "THE BEER-WARE LICENSE" (Revision 42): | |
| # Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain | |
| # this notice you can do whatever you want with this stuff. If we meet some day, | |
| # and you think this stuff is worth it, you can buy us a beer in return. | |
| import argparse, sys, subprocess, tempfile |
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 rfc3339(d) { | |
| function pad(n) { | |
| return n < 10 ? "0" + n : n; | |
| } | |
| function timezoneOffset(offset) { | |
| var sign; | |
| if (offset === 0) { | |
| return "Z"; |
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
| -- Get Max ID from table | |
| SELECT MAX(id) FROM table; | |
| -- Get Next ID from table | |
| SELECT nextval('table_id_seq'); | |
| -- Set Next ID Value to MAX ID | |
| SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |