This file contains hidden or 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 hidden or 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 hidden or 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(){ | |
| var x = 0; | |
| var y = 0; | |
| var width = 100; | |
| var height = 100; | |
| this.collidable = new Collidable({ | |
| bounds: function(){ |
This file contains hidden or 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); | |
| }, |
This file contains hidden or 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
| <script> | |
| FB.getLoginStatus(function(response){ | |
| if (response.status !== 'connected') { // User is not authed in. | |
| top.location.href='https://www.facebook.com/dialog/oauth?' | |
| + 'client_id=522323317786421' | |
| + '&scope=publish_actions' | |
| + '&redirect_uri=https%3A%2F%2Fapps.facebook.com%2Feconavi%2Fredirect.php' | |
| + '&state=93300ac5f310956db957a99869ec8fab'; | |
| } | |
| }); |
This file contains hidden or 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
| #Build a date range with the start of the previous/upcomming months. | |
| now = timezone.now() | |
| current_date = now.date() | |
| months = [] | |
| for month_adjust in range(-2, 3): | |
| month = (now.month + month_adjust) % 12 | |
| if month == 0: month = 12 | |
| months.append(current_date.replace(month=month, day=1)) |
This file contains hidden or 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 | |
| def de_specify_dirs(): | |
| import os | |
| for dir in os.listdir('./'): | |
| if not os.path.isdir(dir): continue | |
| path = os.path.join('./', dir) | |
| if [ file for file in os.listdir(path) if file.endswith('.lut') ]: | |
| continue | |
| os.rename(path, path.replace(' ', '_')) |
This file contains hidden or 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
| if (!Date.prototype.toISOString) { | |
| Date.prototype.toISOString = function() { | |
| function pad(n) { return n < 10 ? '0' + n : n } | |
| return this.getUTCFullYear() + '-' | |
| + pad(this.getUTCMonth() + 1) + '-' | |
| + pad(this.getUTCDate()) + 'T' | |
| + pad(this.getUTCHours()) + ':' | |
| + pad(this.getUTCMinutes()) + ':' | |
| + pad(this.getUTCSeconds()) + 'Z'; | |
| }; |
This file contains hidden or 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 cProfile | |
| def conditions_test(a): | |
| if a == 1 or a == 2 or a == 3 or a == 4: | |
| return | |
| return | |
| def in_test(a): | |
| if a in (1, 2, 3, 4): |
This file contains hidden or 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
| function checkMovementOrSomething(){ | |
| var $element = $("thingy"); | |
| var movementActions = [ | |
| {target: 'wall', callback: function(game){ return false; }} | |
| {target: 'ghost', callback: function(game){if(!game.hasPowerUp()){game.gameOver(); return false;}}}, | |
| {target: 'bubble', callback: function(game){game.points++;game.removeBubble(x, y)}} | |
| {target: 'power-up', callback: function(game){game.setPowerUp(true);}} | |
| ]; | |
| for(var i=0; i< movementActions.length;i++){ | |
| var action = movementActions[i]; |