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 Headout = { | |
apply: function() { | |
return true; | |
}, | |
code: function() { | |
console.log("I", this.a.join(' '), 'code at Headout'); | |
this.a = []; | |
return this; | |
}, | |
a: [] |
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
#!/usr/bin/python | |
import hashlib, sys | |
# Simplified version of https://github.com/drupal/drupal/blob/7.x/includes/password.inc | |
ALGO = hashlib.sha512 | |
ITOA64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' # ICHS |
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
// download soundManager2 and refer it in your scripts http://www.schillmania.com/projects/soundmanager2/doc/download/#latest | |
// also add the swf directory to your project | |
// your module declaration | |
var app = angular.module('myApp', []); | |
// attach the soundManager global for AngularJS dependency injection | |
app.value('soundManager', soundManager); | |
// usage |
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
// Example card. | |
// User-editable properties for this card: | |
export const PROPS = [ | |
propNumber("ticks", 60), | |
propBoolean("infinite", true), | |
propBoolean("completeAnimationDelay", false), | |
propNumber("completeAnimationDelayMin", 60), | |
propNumber("completeAnimationDelayMax", 60), | |
propNumber("forceFrame", -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
# In big teams instead of specifying one email to rule them all as apple_id | |
# You can get this information from environment variable | |
# By doing this it will allow different developers to specify their own apple ids | |
# And if this env variable is not required - then it will be asked on any command that requires apple_id | |
apple_id ENV["MY_APP_NAME_APPLE_ID"] # Your Apple email address | |
### ~/.bashrc of some user | |
export MY_APP_NAME_APPLE_ID="someuser@gmail.com" | |
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
#!/bin/bash | |
# GTK+ and Firefox for Amazon Linux | |
# Written by Joseph Lawson 2012-06-03 | |
# http://joekiller.com | |
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ | |
# chmod 755 ./gtk-firefox.sh | |
# sudo ./gtk-firefox.sh | |
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
import datetime | |
import time | |
from functools import wraps | |
from wsgiref.handlers import format_date_time | |
from flask import make_response | |
def cache(expires=None, round_to_minute=False): | |
""" | |
Add Flask cache response headers based on expires in seconds. |
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
#!/usr/bin/env python | |
# Source: http://code.activestate.com/recipes/325905-memoize-decorator-with-timeout/#c1 | |
import time | |
from functools import wraps | |
class MWT: | |
"""Memoize With Timeout""" | |
_caches = {} | |
_timeouts = {} |
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
{ | |
"AWSEBDockerrunVersion": "1", | |
"Image": { | |
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>", | |
"Update": "true" | |
}, | |
"Ports": [ | |
{ | |
"ContainerPort": "443" | |
} |
OlderNewer