Skip to content

Instantly share code, notes, and snippets.

@metaist
metaist / index.html
Created April 3, 2014 02:47
wordeck - words in a deck
<!DOCTYPE html>
<html><head>
<title>wordeck - words in a deck</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
<link rel="stylesheet/less" href="wordeck.less" />
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/1.7.0/less.min.js"></script>
</head><body class="mode-edit">
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="#">wordeck</a>
@metaist
metaist / ytdl.sh
Created July 6, 2014 15:59
YouTube Batch Downloader
#!/bin/bash
youtube-dl --batch-file $1 --extract-audio --output '%(autonumber)s-%(title)s-%(id)s.%(ext)s'
@metaist
metaist / README.markdown
Last active August 29, 2015 14:06
Chrome App: Hello World + Canvas
@metaist
metaist / tools.markdown
Last active August 29, 2015 14:07
Useful tools.
@metaist
metaist / jquery.removeRegexClass.js
Last active August 29, 2015 14:07
jQuery.removeClass, but allow regular expressions.
(function (factory) {
'use strict';
if ('function' === typeof define && define.amd) {
define(['jquery'], factory); // register anonymous AMD module
} else { factory(jQuery); } // browser globals
}(function (jQuery) {
'use strict';
var
$ = jQuery,
orig = $.fn.removeClass,
@metaist
metaist / falling-square.html
Last active August 29, 2015 14:11
Canvas Demos
<!DOCTYPE html>
<html>
<head>
<style>
html, body { margin: 0; }
canvas {
position: absolute;
height: 100%;
width: 100%;
margin: 0;
@metaist
metaist / echo.php
Created June 11, 2015 18:18
Better TwiML Echo
<?php
header('Content-Type: text/xml');
$result = $_GET['Twiml'];
foreach($_REQUEST as $k => $v) {
if ($k === 'Twiml') { continue; } // avoid infinite loop
$result = str_replace('${' . $k . '}', $v, $result);
}//end for: replaced all the tokens
echo $result;

<text> look too bold?

text { 
  stroke: none;
  fill: #000;

}

@metaist
metaist / .bashrc
Last active September 2, 2015 18:50
Better virtualenv activate.
# Show virtual environment (if any) and git branch (if any; requires .git-prompt.sh).
source ~/.git-prompt.sh
__blank="\[\e]0;\w\a\]\n" # white
__virtualenv=`basename "$VIRTUAL_ENV"`
__userhost="\[\e[32m\]\u@\h" # green
__pwd="\[\e[33m\]\w" # yellow
__cursor="\[\e[0m\]\n\$ " # white
export PS1="${__blank}${__virtualenv:+$__virtualenv }${__userhost} ${__pwd}\$(__git_ps1)${__cursor}"
@metaist
metaist / HebCal.bas
Created December 7, 2012 02:06
Convert dates using HebCal's web service.
'Version 0.1.2 // 2012-12-07
'Required References:
' Microsoft Scripting Library
' Microsoft XML
Dim cache As New Dictionary
Dim fso As New FileSystemObject
Public Const LIMIT_CACHE = False 'keep cache small
Public Const REFRESH_CACHE = True 'delete old cache