Skip to content

Instantly share code, notes, and snippets.

View mikekavouras's full-sized avatar

Mike Kavouras mikekavouras

View GitHub Profile
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]
var timing = window.performance.timing,
domInteractive = timing.domInteractive,
requestStart = timing.requestStart,
responseStart = timing.responseStart;
console.log('Start request -> DOM Interactive', domInteractive - requestStart);
console.log('Start response -> DOM Interactive', domInteractive - responseStart);
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset='\[\e[0m\]'
c_user='\[\033[0;33m\]'
c_path='\[\e[0;33m\]'
c_git_clean='\[\e[0;36m\]'
c_git_dirty='\[\e[0;35m\]'
else
c_reset=
c_user=
extension RangeReplaceableCollectionType {
public func slice(start: Int, _ stop: Int = 0, _ step: Int = 1) -> [Generator.Element] {
var _stop = stop
if stop == 0 {
_stop = self.count as! Int
}
var sliced = Array<Generator.Element>()
//: Playground - noun: a place where people can play
class global {
class func getUserId() -> String {
return "10"
}
}
class AccountData {
function bindClick(index) {
jQuery('.lock' + index).click(function() {
jQuery('.lock' + index).addClass('unlocked');
jQuery('.door' + index).addClass('open');
});
}
for (var i = 1; i <= X; i++) {
bindClick(i);
}
func getRequest(urlString: String, completion: (NSDictionary) -> Void) {
let defaultSession = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration())
let urlPath: String = urlString.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet())!
let url: NSURL = NSURL(string: urlPath)!
let request: NSURLRequest = NSURLRequest(URL: url)
do {
let task = defaultSession.dataTaskWithRequest(request, completionHandler: { (data, response, error) in
function loadImages(images, callback) {
var loaded = 0;
for (var i = 0; i < images.length; i++) {
var img = new Image();
img.onload = function() {
loaded++;
if (loaded === images.length) { callback(); }
};
img.onerror = img.onload;
img.src = images[i];
(function(TS) {
'use strict';
console.log(TS);
}(TS));
(function() {
'use strict';
//: Playground - noun: a place where people can play
import UIKit
struct Obj {
let id: String
init(id: String) {
self.id = id
}
}