Skip to content

Instantly share code, notes, and snippets.

View kana's full-sized avatar

Kana Natsuno kana

View GitHub Profile
" Assumption: This script is executed by gVim.
function! s:css_property_from(vim_attribute)
if a:vim_attribute ==# 'bold' || a:vim_attribute ==# 'standout'
return 'font-weight: bolder;'
elseif a:vim_attribute ==# 'underline'
return 'text-decoration: underline;'
elseif a:vim_attribute ==# 'undercurl'
return 'border-bottom: thin dashed;'
find foo bar baz -path '*blahblah*' -type f >whitelist
if(location.href.indexOf('file')==0){var a=document.title,b='setInterval(function(){var c=arguments.callee,a=new XMLHttpRequest;a.open("GET","'+prompt('Trigger file',location.href)+'",true);a.onload=function(){c.a&&a.responseText!=c.a&&window.doc.location.reload(true);c.a=a.responseText};a.send(null)},1E3);';document.write('<script type="text/javascript">'+b+'<\/script><frameset><frame name="doc" src="'+location.href+'"></frame></frameset>');document.close();document.title=a}else alert('This is not a local file.');
(use srfi-19)
(use util.match)
(define (read-file path)
(define (calculate-key object)
(match-let ([(_ _ id _ ...) object])
id))
(let1 d (make-hash-table 'eqv?)
(call-with-input-file
path
using System;
using System.Collections;
using System.Web.UI.WebControls;
using System.Web;
using System.Linq;
using System.Collections.Generic;
Foo(1,
2,
3);
Foo(
1,
2,
3
);
@kana
kana / gist:719685
Created November 29, 2010 07:20
fnfnen.css
.spam.tweet {background: #ddd;}
#form_preferences .debug {display: block;}
.prafbe.debug {display: inline; margin-right: 1ex;}
.prafbe.button {float: right;}
.tweet {clear: both;}
.tweet:hover {background-color: #ffe;}
abstract class CacheTable<TKey, TValue>
{
public void Expire()
{
m_table = null;
}
abstract public IDictionary<TKey, TValue> CreateTable();
public TValue Lookup(TKey key)
@kana
kana / x.js
Created December 5, 2010 05:48
var rd = g_preferences.prafbe_right_dict();
var wd = g_preferences.prafbe_wrong_dict();
var td = {};
var ts = [];
for (var t in rd) {
if (!(td[t])) {
ts.push(t);
td[t] = true;
}
}
Enumerable.Empty<string>();