Skip to content

Instantly share code, notes, and snippets.

View lukaville's full-sized avatar
🏠
Working from home

Nick Chameyev lukaville

🏠
Working from home
  • Google
  • London, United Kingdom
View GitHub Profile
@zapthedingbat
zapthedingbat / logeverything.js
Created August 19, 2014 12:22
Log every function call to the console
(function() {
var call = Function.prototype.call;
Function.prototype.call = function() {
console.log(this, arguments);
return call.apply(this, arguments);
};
}());
@bomberstudios
bomberstudios / 2048.sketchplugin
Created April 23, 2014 13:49
Play 2048 inside Sketch.app, just because...
var URL = "http://gabrielecirulli.github.io/2048/"
var frame = NSMakeRect(0,0,340,480)
var webView = [[WebView alloc] initWithFrame:frame]
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:URL]]]
var mask = NSTitledWindowMask + NSClosableWindowMask + NSMiniaturizableWindowMask + NSResizableWindowMask + NSUtilityWindowMask;
var window = [[NSPanel alloc] initWithContentRect:frame styleMask:mask backing:NSBackingStoreBuffered defer:true];
[[window contentView] addSubview:webView]
[window makeKeyAndOrderFront:nil]
@slightfoot
slightfoot / MainActivity.java
Created September 6, 2013 10:50
FadeyTextView example.. will animate text in like "H, He, Hel, Hell, Hello, etc"
package com.example.fadeytextthingy;
import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.support.v4.view.ViewCompat;
@masak
masak / explanation.md
Last active April 11, 2024 02:50
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@mlconnor
mlconnor / country_date_formats.csv
Created February 22, 2012 20:49
Listing of countries with their preferred date formats, ISO3166 code, ISO629-2
ISO 3166 Country Code ISO639-2 Country Code Country ISO 3166 Country Code ISO639-2 Lang Language Date Format
ALB AL Albania sqi sq Albanian yyyy-MM-dd
ARE AE United Arab Emirates ara ar Arabic dd/MM/yyyy
ARG AR Argentina spa es Spanish dd/MM/yyyy
AUS AU Australia eng en English d/MM/yyyy
AUT AT Austria deu de German dd.MM.yyyy
BEL BE Belgium fra fr French d/MM/yyyy
BEL BE Belgium nld nl Dutch d/MM/yyyy
BGR BG Bulgaria bul bg Bulgarian yyyy-M-d
BHR BH Bahrain ara ar Arabic dd/MM/yyyy