Skip to content

Instantly share code, notes, and snippets.

//
// ViewController.swift
// TestSwift
//
// Created by Jameson Quave on 6/2/14.
// Copyright (c) 2014 JQ Software LLC. All rights reserved.
//
import UIKit
@siygle
siygle / gist:f6cd45b3c4702c5d2500
Created July 4, 2014 04:09
phantom screenshot
var page = require('webpage').create();
var system = require('system');
var address, output, size;
if (system.args.length < 3 || system.args.length > 5) {
process.exit(1);
} else {
address = system.args[1];
output = system.args[2];
page.viewportSize = { width: 800, height: 500 };
// Playground - noun: a place where people can play
import UIKit
// constant and variable
//let langName: String = "Swift"
//var version: Double = 1.0
//let introduced: Int = 2014
//let isAwesome: Boolean = true
@siygle
siygle / gist:ae67a8dae900c2952c3c
Created July 20, 2014 18:31
intermediate swift
// Playground - noun: a place where people can play
import Cocoa
var str = "Hello, playground"
// optional type
// not sure which kind of data we will get
// default to nil
@siygle
siygle / gist:bed1aa3e7520fdbf2649
Last active August 29, 2015 14:07
JSDC.TW 2014
var url = "https://www.facebook.com/dialog/oauth?&client_id=myBigClientID&redirect_uri=https://www.facebook.com/connect/login_success.html&response_type=token&scope=publish_actions";
function Response() {
this.access_token = null;
this.expires_in = null;
};
var response = new Response();
//function called every 500ms to check if token is in url
#!/usr/bin/env python
# Written with pymongo-2.6
# Modify for pymongo-2.1
#!/usr/bin/env python
__author__ = 'mongolab' \
$(document).ready(function(){
$(".click").toggle(function(){
$("#box").css("-webkit-transform","scale(2.1) rotate(-90deg)"); },
function () {
$("#box").css("-webkit-transform","scale(1) rotate(0)");
})
})
<IfModule mod_python.c>
<FilesMatch "\.py$">
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug on
</FilesMatch>
</IfModule>
require_once __DIR__.'/silex.phar';
$app = new Silex\Application();
$app->get('/hello/{name}', function($name) {
return "Hello $name";
});
$app->run();