Skip to content

Instantly share code, notes, and snippets.

View milkowski's full-sized avatar

Wojciech Miłkowski milkowski

View GitHub Profile
@titanous
titanous / twilight.vim
Created February 27, 2010 21:34
Twilight vim color scheme
" Vim color scheme
"
" Name: twilight.vim
" Maintainer: Jonathan Rudenberg <jonathan@titanous.com>
" License: MIT
"
" A GUI only vim theme based on the Twilight TextMate theme.
" Original structure taken from railscasts.vim [1].
" Some parts of this theme were borrowed from the well-documented Lucius theme [2].
"
@mojombo
mojombo / vwilight.vim
Created January 26, 2011 03:23
vwilight.vim: A TRUE Twilight color theme for Vim
" Vim color file
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
@Raynos
Raynos / a.md
Created January 23, 2012 19:48
Shim status of ES6

ES6 what can be shimmed and what not.

Currently only lists things that can be shimmed or are experimentally implemented

Note that for any kind of decent ES6 support we need an ES6 transpiler. A few projects are attempting this [Reference SO question][3]

  • [traceur][4]
  • [Caja][5]
  • [ES transpiler][6]
@rygorous
rygorous / gist:2156668
Last active April 16, 2024 11:18
float->half variants
// float->half variants.
// by Fabian "ryg" Giesen.
//
// I hereby place this code in the public domain, as per the terms of the
// CC0 license:
//
// https://creativecommons.org/publicdomain/zero/1.0/
//
// float_to_half_full: This is basically the ISPC stdlib code, except
// I preserve the sign of NaNs (any good reason not to?)
@evilpie
evilpie / disassembler.js
Created April 4, 2012 11:51
Disassembler for Notch's 'DCPU-16'
/* See: http://0x10c.com/doc/dcpu-16.txt */
function hex(n) {
return '0x' + n.toString(16);
}
function disassemble (code) {
var PC = 0;
var operand = function (bits) {
var container;
var camera, scene, renderer;
var mouseX = 0, mouseY = 0;
var windowHalfX = window.innerWidth / 2;
var windowHalfY = window.innerHeight / 2;
init();
animate();
@tylerneylon
tylerneylon / learn.lua
Last active May 16, 2024 05:47
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------
@aras-p
aras-p / preprocessor_fun.h
Last active May 18, 2024 08:55
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
_getLocalSuggestions: function(terms) {
var that = this, firstChars = {}, lists = [], shortestList, suggestions = [];
utils.each(terms, function(i, term) {
var firstChar = term.charAt(0);
!~utils.indexOf(firstChars, firstChar) && firstChars.push(firstChar);
});
utils.each(firstChars, function(i, firstChar) {
var list = that.adjacencyList[firstChar];
if (!list) {
return false;
--an implementation of smoothsort.
--the code is in a "monadic" style for fun.
--you should [probably] not actually code like this.
function leonardo(n)
local function lc(i, j, n)
return n > 1 and lc(j, i+j+1, n-1) or j
end
return lc(1, 1, n)
end