Skip to content

Instantly share code, notes, and snippets.

@y-yu
y-yu / taple.tex
Last active December 10, 2015 19:28
\documentclass{jarticle}
\makeatletter
\def\tuple#1{%
\begingroup
\newcount\@fuck@i
\newcount\@fuck@ii
\@fuck@i = -1
\@fuck@ii = 0
@7shi
7shi / __inst2.txt
Created November 28, 2012 22:38
AArch64(ARM64) instructions
0e20b800 abs V, V
5ee0b800 abs D, D
1a000000 adc W, W, W
1a1f0000 adc W, W
9a000000 adc X, X, X
9a1f0000 adc X, X
3a000000 adcs W, W, W
3a1f0000 adcs W, W
ba000000 adcs X, X, X
ba1f0000 adcs X, X
@7shi
7shi / label.cpp
Created November 26, 2012 08:37
PE generation with labels
// public domain
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <map>
#include <memory>
#include <windows.h>
@dunkfordyce
dunkfordyce / gist:4065345
Created November 13, 2012 11:38
Convert single line comments in javascript to console.log statements with esprima/falafel/javascript
var falafel = require('falafel');
var src = require('fs').readFileSync(process.argv[2]).toString();
var output = falafel(src, {comment: true}, function (node) {
if (node.type === 'Line') {
node.update('console.log("COMMENT:' + node.value + '");');
}
});
console.log(output);
@ranha
ranha / aznyn.tex
Created October 20, 2012 06:44
latex
\documentclass{minimal}
\newread\file
\newcommand{\content}{}
\begin{document}
\immediate \typeout{here1}
\immediate\openin\file=http://404.org
\immediate \typeout{here2}
\immediate\read\file to \content
\immediate \typeout{here3}
\immediate\closein\file
@ynkdir
ynkdir / ShortMsgKAT_0.txt
Created October 7, 2012 12:08
Keccak in Vim
This file has been truncated, but you can view the full file.
# ShortMsgKAT_0.txt
# Algorithm Name: Keccak
# Principal Submitter: The Keccak Team (Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche)
Len = 0
Msg = 00
Squeezed = 6753E3380C09E385D0339EB6B050A68F66CFD60A73476E6FD6ADEB72F5EDD7C6F04A5D017A19CBE291935855B4860F69DF04C98AA78B407A9BA9826F7266EF14BA6D3F90C4FE154D27C2858EA6DB8C117411A1BC5C499410C391B298F37BF636B0F5C31DBD6487A7D3D8CF2A97B619697E66D894299B8B4D80E0498538E18544C3A2FA33F0BFB1CFEF8DA7875C4967F332C7FC93C050E81FB404F9A91503D6010EE16F50B4ED0BC563BA8431668B003D7E2E6F226CB7FA93BB2E132C861FDC2141457589A63ECF05481126A7C2DE941A2FDEC71CB70DE81887B9014223865E79C4FFE82DAE83C1FC484B9A07A7E52B135F4AE3A0E09247EA4E2625E9349B0AC73F24CB418DF6DCB49CA37860298ADA18AA23595B5096EF789DE3EDF3826817FFF4F71102A01E1D2599F2958D5C186F5B11F5FEEDB61BB732DBB42D18B1E77258A8F211BF95C9F47F19603EC419FF879AEA41A4811344D016BBC4F9496741C469CCA425C5BE73543219AF40796C0B9FF14AEAA70C5E22E4BB1346A3DDFEDD8A559104E4704F1227D42918AE3F7404FBF3C6340A486E776AABCC34190F87DA4BD954B83386255
@kazu-yamamoto
kazu-yamamoto / gist:2987415
Created June 25, 2012 08:43
Real Time Queue
{-# LANGUAGE BangPatterns #-}
module RealTimeQueue where
----------------------------------------------------------------
import Control.Applicative ((<$>))
import qualified GHC.Vacuum
import qualified GHC.Vacuum.ClosureType
import System.IO.Unsafe
@hrstt
hrstt / git_rm_all.sh
Created June 19, 2012 04:59
ファイル削除後にgit rm を一括でする
git status | grep deleted: | awk '{print $3}' | xargs git rm
# ただしカラースキーム付きの場合は保証しない.
@kumagi
kumagi / benchmark.cc
Created June 17, 2012 03:23
single thread Hopscotch hashing with C++
#ifndef MAP_HPP
#define MAP_HPP
//#include <cstdint>
#include <stdint.h>
#include <cstddef>
#include <map>
#include <functional>
#include <boost/functional/hash.hpp>
#include <memory>
#include <utility>
@kumagi
kumagi / benchmark.cc
Created June 16, 2012 11:21
nanahan vs boost benchmark
#include <boost/chrono.hpp>
#include <boost/unordered_map.hpp>
#include "map.hpp"
using namespace boost;
using namespace chrono;
using namespace nanahan;
int main(void)
{
unordered_map<int, int> bmap;