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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
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 AWS = require('aws-sdk'), | |
converter = require('xml-json'), | |
Stream = require('stream'), | |
fs = require('fs'), | |
through = require('through2'), | |
zlib = require('zlib'), | |
crypto = require('crypto'), | |
mime = require('mime'), | |
pascalCase = require('pascal-case'), | |
gutil = require('gulp-util'); |
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 fs = require('fs') | |
var spawn = require('child_process').spawn | |
var convertToSquare = spawn('convert', ['-quality', '1', '-', '-resize', '150x150^^', '-gravity', 'Center', '-extent', '150x150', 'PNG32:-']) | |
var convertToCircle = spawn('convert', ['-size', '150x150', 'xc:none', '-fill', '-', '-draw', 'circle 75,75 75,1', 'PNG32:-']) | |
var readFile = fs.createReadStream('image.png') | |
var writeFile = fs.createWriteStream('image-150x150-circle.png') | |
readFile.pipe(convertToSquare.stdin) |
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
private var autoId: Int = 1 | |
// MARK: Subscription Protocol | |
protocol Subscription { | |
func remove() | |
} | |
// MARK: AbstractSubscription<T> |
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 Foundation | |
import UIKit | |
class <#name#>: UIViewController { | |
// MARK: static properties | |
struct statics { | |
static let someValue = 1 | |
static let someOtherValue = "foo" |
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 Foundation | |
// global singleton instance | |
let tweaks = FBTweakStore.sharedInstance() | |
/** | |
* ## Usage | |
* | |
* class MyClass { | |
* struct statics { |
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
/** | |
* table display test | |
*/ | |
body { | |
min-height:100%; | |
padding-top: 100px | |
} | |
div { | |
outline: 2px solid grey; |
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
io = require 'socket.io' | |
io.Socket::onEvent = (ev, cbs...) -> | |
@on ev, (args...) -> | |
cbList = cbs.slice() | |
# set callback parameter if any | |
fn = args[args.length-1] if typeof args[args.length-1] is 'function' |
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
ul { | |
overflow: hidden; | |
*zoom: 1; | |
height: 50px; | |
background: #333; | |
color: white; | |
} | |
li { |
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
body { | |
/*background-color: blue*/ | |
} | |
ul { | |
overflow: hidden; | |
*zoom: 1; | |
height: 150px; | |
background: #333; | |
color: white; |
OlderNewer