Skip to content

Instantly share code, notes, and snippets.

@yllan
yllan / ciphertext_hex.txt
Last active October 29, 2015 06:32
1 byte key XOR
0f3d343b37353d782c37781517081b1716786a68696d7478117834372e3d78312c79
台灣人 https://www.facebook.com/groups/531143730240238/permalink/986260288061911/
安全帽 https://www.facebook.com/groups/531143730240238/permalink/986244858063454/
@yllan
yllan / xcode-crash.log
Created June 18, 2015 03:31
crash log
Process: Xcode [29067]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.3.2 (7718)
Build Info: IDEFrameworks-7718000000000000~2
App Item ID: 497799835
App External ID: 812404257
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [29067]
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
vector<interval_t> pass_lane(vector<interval_t> &gaps, vector<interval_t> &time_intervals)
{
vector<interval_t> result;
// assert: gaps are increasing and non-overlapping.
// assert: time_intervals are increasing and non-overlapping.
int idx = 0;
FOREACH(time_intervals, t) {
while (idx < gaps.size()) {
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.io.*;
import java.math.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
public class A {
static BufferedReader br;

上官 Jr. 命名大賽

  • 對穿腸: 上官下民(適合宗教界發展)
  • C語言版:上官十十
  • 微軟程式語言版:上官井、上官丼、上官打內(向公司顯示忠誠)
  • 函式語言版:上冠入、上官浪達
  • 回文版:上官上、上官官上、上官被官上(適合嗆聲:不然我把名字倒著唸)
  • 眼花撩亂版:上官宜宮
  • 孫子兵法版:上官伐謀
  • 夫婦融合版:上官黃傑
@yllan
yllan / matching.cpp
Created December 14, 2014 17:39
matching
#include <cstdio>
#include <algorithm>
#define N 7
typedef char matching[N * 2];
/** @return negative if a is "better" than b. */
int compare(matching a, matching b)
{
int vote = 0;
@yllan
yllan / show_my_tweet.js
Last active August 29, 2015 14:08
Show the position of your tweet in perfume-global.com World Tour 3 count down site.
javascript:(function(){m=pointCloudMesh;for(i=m.enabledParamsNum-1;i>=0;i--)if(m.getTwitterData(i).user_name=="yllan"){m.setPointSize(i,70);m.attributes.r.value[i]=0.3;m.attributes.r.needsUpdate=true;}})()
@yllan
yllan / gist:964426dded5177515aa0
Created August 22, 2014 07:11
ant compile settings
<wocompile srcdir="Sources" destdir="bin" debug="true" debuglevel="lines,vars,source">