Skip to content

Instantly share code, notes, and snippets.

View MarketingPip's full-sized avatar
🚬
🌳

Jared Van Valkengoed MarketingPip

🚬
🌳
View GitHub Profile
@syzdek
syzdek / books.sql
Created May 5, 2011 07:26
SQLite3 Example DB and queries
--
-- Simple SQLite3 Example
-- Copyright (C) 2011 David M. Syzdek <david@syzdek.net>
--
-- Run:
-- cat hello.sql | sqlite3 hello.db
--
-- creates tables
@bluesmoon
bluesmoon / LICENSE.txt
Created October 18, 2011 16:58 — forked from aemkei/LICENSE.txt
JS ASCII Logo - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@assertchris
assertchris / gist:2577836
Created May 2, 2012 16:09
Highlight lines in Ace (Editor)
###
CoffeeScript
marker = null;
require(["ace/range"], (range) ->
marker = editor.getSession().addMarker(new range.Range(7, 0, 7, 2000), "warning", "line", true);
)
setTimeout(->
@lsauer
lsauer / converter.coffee
Created May 18, 2012 09:36
JavaScript / Coffeescript : Lightweight Conversion of HTML Entities to ASCII / ASCII 2 HTML
html2ascii = (asciis) ->
asciis.map (e, i, a) ->
String.fromCharCode HTML_ENTITIES.indexOf(e) if -1 isnt HTML_ENTITIES.indexOf(e)
ascii2html = (asciis) ->
asciis.map (e, i, a) ->
String.fromCharCode +e if HTML_ENTITIES.hasOwnProperty(e)
HTML_ENTITIES = Array(255)
HTML_ENTITIES["34"] = "&quot;"
HTML_ENTITIES["38"] = "&amp;"
HTML_ENTITIES["39"] = "&#39;"
@lsauer
lsauer / textanim.html
Created June 1, 2012 09:13
JavaScript - Pure Text based animation fun with Unicodes / ASCII
<html><head></head><body>
<div id="timer">◉</div>
</body></html>
@ancestral
ancestral / ASCII JS Keyboard Map
Created July 6, 2012 04:33
ASCII keyboard map for JavaScript keycodes (Mac)
/*
* JavaScript Keyboard Map (Mac layout)
*
*
* esc—— F1——— F2——— F3——— F4——— F5——— F6——— F7——— F8——— F9——— F10—— F11—— F12—— F13—————+
* | 27 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | ??? |
* ` ——— 1———— 2———— 3———— 4———— 5———— 6———— 7———— 8———— 9———— 0———— - ——— = ——— delete——+
* | 192 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |
* tab———— Q———— W———— E———— R———— T———— Y———— U———— I———— O———— P———— [ ——— ] ——— \ ————+
* | 9 | 81 | 87 | 69 | 82 | 84 | 89 | 85 | 73 | 79 | 80 | 219 | 221 | 220 |
@Loddan
Loddan / iso639.js
Created November 14, 2012 22:58
Generates JSON ISO 639-1 Codes from Wikipedia
#!/usr/bin/env node
var jsdom = require('jsdom');
var wikipedia = 'http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes';
var jquery = 'http://code.jquery.com/jquery.js';
jsdom.env(wikipedia, [jquery], function (errors, window) {
var $ = window.$;
var tds = $('table[class="wikitable sortable"] > tr > td');
if (tds.size() % 10 != 0) {
@terretta
terretta / gist:4081758
Created November 15, 2012 22:16
Full List of Siri Comands
Full list of Siri Commands
Contacts
“What’s Michael’s address?”
“What is Susan Park’s phone number?”
“When is my wife’s birthday?”
“Show Jennifer’s home email address”
“Show Jason Russell”
“Find people named Park”
@duncansmart
duncansmart / progressive-ace.htm
Created March 28, 2013 23:29
Integrating ACE Editor in a progressive way
<textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea>
...
<textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea>
...
<script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script>
<script>
// Hook up ACE editor to all textareas with data-editor attribute
$(function () {
@mnpenner
mnpenner / mode-mysql.js
Created April 16, 2013 02:14
MySQL mode for Ace editor. Based on existing pgsql mode with MySQL keywords and functions.
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.