I hereby claim:
- I am luwes on github.
- I am luwes (https://keybase.io/luwes) on keybase.
- I have a public key ASDE6Oaedhz1Ud4ltpbKU0z19dFw1ubiJRxvsg_xqs4nsQo
To claim this, I am signing this object:
/** | |
* Sub JavaScript library v0.2 | |
* Very limited substitute for jQuery to include | |
* in small projects so you have no dependencies | |
* Browser support IE8+ | |
* | |
* Includes code snippets from | |
* http://jquery.com/ | |
* http://underscorejs.org/ | |
* |
String.prototype.populate = function(obj, funcs) { | |
return this.replace(/\{\{\s*([^|\s}]+)\|?([^\s}]*)\s*\}\}/g, function(match, key, mods) { | |
var str = obj[key]; | |
if (typeof str !== "undefined") { | |
if (funcs && mods) { | |
var arr = mods.split('|'); | |
for (var i = 0; i < arr.length; i++) { | |
var mod = arr[i].split(':')[0]; | |
var par = arr[i].split(':')[1]; | |
var args = par ? par.split(',') : []; |
@mixin prefixed($property, $value) { | |
@each $prefix in "-webkit-", "-moz-", "-ms-", "-o-", "" { | |
#{$prefix}#{$property}: #{$value}; | |
} | |
} | |
@mixin transition($props) { | |
@include prefixed('transition', $props); | |
} |
#!/usr/bin/env bash | |
# Written by William Ting for the following blog post: | |
# http://williamting.com/posts/2012/04/18/set-up-python-and-django-on-dreamhost/ | |
rcfile="${HOME}/.bashrc" | |
version="2.7.8" | |
setuptools_version="2.7" | |
tmp_dir="${HOME}/tmp-${RANDOM}" | |
if [[ ${#} == 0 ]]; then |
class BaseHandler(RequestHandler): | |
COOKIE_NAME = 'user' | |
def get_current_user(self): | |
user_json = self.get_secure_cookie(self.COOKIE_NAME) | |
if not user_json: | |
return None | |
return json_decode(user_json) | |
class LoginHandler(BaseHandler, VimeoMixin): |
/* eslint-env node */ | |
const fs = require('fs'); | |
const uglifyJs = require('uglify-js'); | |
const chalk = require('chalk'); | |
const maxmin = require('maxmin'); | |
const rollup = require('rollup'); | |
const babelrc = require('babelrc-rollup').default; | |
const babel = require('rollup-plugin-babel'); | |
const nodeResolve = require('rollup-plugin-node-resolve'); |
/** | |
The selectors would be a map e.g. | |
const selectors = { | |
ui: { | |
getDoubleBurgers: (state) => state.ui.burger + state.ui.burger | |
} | |
} |
/* eslint-env node */ | |
const fs = require('fs'); | |
const path = require('path'); | |
const camelCase = require('lodash/camelcase'); | |
const pkg = require(path.resolve('package.json')); | |
const defaultOptions = { | |
regex: /^rollup-plugin-/, | |
path: './' | |
}; |
import { html } from 'lit-html'; | |
const superhtml = tagRef(html) | |
const result = superhtml`<${MyComponent}>Woohoo</${MyComponent}>`; | |
export function tagRef(html) { | |
const cache = new WeakMap(); | |
return (s, ...e) => { | |
const tagIndex = (t, i) => | |
// checks for '*<' or '*</' and a valid tagname |
I hereby claim:
To claim this, I am signing this object: