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 pytz | |
>>> from datetime import datetime | |
>>> time_zone = pytz.timezone('Asia/Singapore') | |
>>> my_time = datetime.utcnow() | |
>>> my_time | |
datetime.datetime(2012, 9, 7, 12, 6, 15, 56631) | |
>>> my_time.replace(tzinfo=pytz.utc) | |
datetime.datetime(2012, 9, 7, 12, 6, 15, 56631, tzinfo=<UTC>) | |
>>> my_time = my_time.replace(tzinfo=pytz.utc) | |
>>> my_time.astimezone(time_zone) |
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
>>> PUBLIC_KEY = 'TkhL2k0lvpvb5KIiN8l0E1tcMAEguAXy8rPOheJfwkjUGdrWLZSJIr2Mv2Dnyhy1' | |
>>> SECRET_KEY = 'notmykey' | |
>>> ACCESS_TOKEN = 'alsonotmykey' | |
>>> disqus = DisqusAPI(SECRET_KEY, PUBLIC_KEY) | |
>>> disqus.users.details(access_token=ACCESS_TOKEN) | |
{'favicon': {'cache': 'https://securecdn.disqus.com/1373918630/images/favicon-default.png', | |
'permalink': 'https://disqus.com/api/forums/favicons/transformbusiness.jpg'}, | |
'founder': '61541387', | |
'id': 'transformbusiness', |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'video', | |
attributeBindings: ['_muted:muted', 'playsinline', 'autoplay', 'src', 'controls'], | |
_muted: Ember.computed(function(){ | |
return true; | |
}), | |
muted: true, | |
playsinline: true, |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
openModal(){ | |
this.sendAction('openModal'); | |
} | |
} | |
}); |
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
### Keybase proof | |
I hereby claim: | |
* I am kitsunde on github. | |
* I am kitsunde (https://keybase.io/kitsunde) on keybase. | |
* I have a public key ASDNjRB3ZAPxi1xab21wLv786J5Q_dSF2n3qWeNC0vUtago | |
To claim this, I am signing this object: |
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 node | |
var exec = require('child_process').exec; | |
var fs = require('fs'); | |
var eslint = require('../node_modules/eslint/lib/cli'); | |
var files; | |
var child = exec("git diff-index --cached --name-only HEAD", function(error, stdout, stderr){ | |
files = stdout.split('\n').filter(function(i){ |
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
# We control the existance of the build-server by setting this to 0 or 1 | |
variable "build_servers" { | |
} | |
provider "aws" { | |
access_key = "<aws_key>" | |
secret_key = "<aws_secret>" | |
region = "us-east-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
git+git://github.com/Celc/facebook-sdk.git@05ef99bbd2eab3dced959cbd913b2719772a1861#egg=facebook-sdk | |
git+git://github.com/bmihelac/django-import-export.git@e3087e4dc7b0a191587c2a890035286c065f4971#egg=import-export |
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
upstream cuteletter{ | |
server 127.0.0.1:8000; | |
} | |
server { | |
listen 80; | |
listen 9001 default_server; | |
server_name www.cuteandfluffythings.com cuteandfluffythings.com; | |
access_log /var/log/nginx/cuteletter.access.log; |
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 collidables = new Collidables(); | |
function GameObject(){ | |
this.collidable = new Collidable({ | |
get: function(){ | |
return new BoundingBox(this.x, | |
this.y, | |
this.x + this.width, | |
this.y + this.height); | |
}, |
NewerOlder