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
on run {input, parameters} | |
tell application "System Events" | |
set activeApp to name of first process whose frontmost is true | |
end tell | |
set _timestamp to (input as string) | |
tell application activeApp | |
set realDate to ((do shell script "date -r " & _timestamp) as string) |
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
#include <stdlib.h> | |
#include <GL/glew.h> | |
#ifdef __APPLE__ | |
# include <GLUT/glut.h> | |
#else | |
# include <GL/glut.h> | |
#endif | |
#include <math.h> | |
#include <stdio.h> | |
#include "util.h" |
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
# | |
# Resizyr - WebGL Image Resizer | |
# | |
# Extensions | |
# This allows us to do for example the following: | |
# 5.times () -> console.log "foo" | |
# | |
Number::times = (fn) -> | |
do fn for [1..@valueOf()] |
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
type Race string | |
const ( | |
Protoss Race = "protoss" | |
Terran Race = "terran" | |
Zerg Race = "zerg" | |
) |
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
[{"phonenumber": "(09) 7533 100", "name": "3. linja", "address": "Kolmas linja 6", "latitude": 60.1817299628, "tags": ["olutravintola"], "homepage": "", "longitude": 24.9509723639, "description": "Minikokoinen kivijalkapubi 3:nnella linjalla, jota Fredikin kulki takaisin. Baarissa kaksi televisiota. Halpa tuoppi."}, {"phonenumber": "(09) 343 2814", "name": "4 Vuodenaikaa", "address": "Rusthollarintie 2", "latitude": 60.2122766079, "tags": [""], "homepage": "", "longitude": 25.0960335589, "description": ""}, {"phonenumber": "0400 211 921", "name": "A21", "address": "Annankatu 21", "latitude": 60.1662143231, "tags": ["cocktail", "drinkkej\u00e4", "drinkkibaari", "juhlapaikka", "kokoustila"], "homepage": "http://www.a21.fi/", "longitude": 24.9378044239, "description": "Cocktail Lounge A21 keskittyy hyviin drinkkeihin eli ns. \"Fine Drinkingiin\". Cocktail-lista on jaettu nelj\u00e4\u00e4n kategoriaan, joiden kautta cocktailien laaja kirjo aukeaa maallikollekin. Tarjolla on makuja suomalaisesta luonnosta, kauden |
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
// Constants | |
#define APP_VERSION [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] | |
#define APP_NAME [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"] | |
#define APP_DELEGATE [[UIApplication sharedApplication] delegate] | |
#define USER_DEFAULTS [NSUserDefaults standardUserDefaults] | |
#define APPLICATION [UIApplication sharedApplication] | |
#define BUNDLE [NSBundle mainBundle] | |
#define MAIN_SCREEN [UIScreen mainScreen] | |
#define FILE_MANAGER [NSFileManager defaultManager] | |
#define DOCUMENTS_DIR [[FILE_MANAGER URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject] |
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
from django import forms | |
from django.conf import settings | |
from django.utils.safestring import mark_safe | |
class GoogleMapsWidget(forms.HiddenInput): | |
# Media to be includes with the widget | |
class Media: | |
js = ( |
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 sensate | |
import Sensate, { Event, Message } from 'sensate' | |
// Import wanted gateways | |
import SlackGateway from 'sensate-gateway-slack' | |
// Logging | |
const log = () => console.log.apply(console, arguments) | |
// Create a new sensate instance that connects to slack |
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
// Create dummy click event for automation | |
var click = new MouseEvent('click', { 'clientX': 1,'clientY': 1 }); | |
// Create button boilerplate | |
function createButton(title, action) { | |
var button = document.createElement('button'); | |
button.innerText = title; | |
button.onclick = function(e) { | |
e.preventDefault(); | |
action(e); |
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
newQuad.bl.textureVertex = CGPointMake(0, 0); | |
newQuad.br.textureVertex = CGPointMake(1, 0); | |
newQuad.tl.textureVertex = CGPointMake(0, 1); | |
newQuad.br.textureVertex = CGPointMake(1, 1); |
NewerOlder