As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/zsh | |
i=0 | |
while [ $i -le 800 ]; do | |
echo trying the $i times... | |
i=$(($i + 1)) | |
md5=$(curl http://yuyang.co/game/\?width\=$i\&k\=0eb46665addf43389ae950050f787a45 | md5sum) | |
#echo $md5 | |
if [ "$md5" != "c92e32594fd6558d6e1df9ab77daca42 -" ]; then | |
echo width is found: $i | |
break |
(define (list-add lst1 lst2) | |
(define (iter a1 a2 carry ret) | |
(cond ((and (null? a1) (null? a2)) | |
(if carry | |
(append ret '(1)) | |
ret)) | |
((null? a1) | |
(if carry | |
(iter '(1) a2 #f ret) | |
(append ret a2))) |
#include <stdio.h> | |
#include "share1.h" | |
#include "share2.h" | |
#include "static.h" | |
int main() { | |
printf("hello world\n"); | |
int a = 4; | |
int b = 2; | |
printf ("a: %d, b: %d\n", a, b); |
#include <iostream> | |
struct Origin { | |
int a; | |
}; | |
struct Wrapper { | |
Origin *orig; | |
Origin *operator->() const { | |
return orig; |
#include <iostream> | |
#include <random> | |
typedef std::mt19937 EngineType; | |
typedef std::uniform_int_distribution<std::mt19937::result_type> GeneratorType; | |
bool GetIt(EngineType& engine, const GeneratorType& generator3, bool change) { | |
int correct_door = generator3(engine); | |
int first_choice = generator3(engine); |
#!/usr/bin/env node | |
var fs = require('fs'); | |
var http = require('http'); | |
var request = require('request'); | |
var urlListFile = 'url.list'; | |
if (!fs.existsSync(urlListFile)) { |
#ifndef DELEGATE_HPP_INCLUDED | |
#define DELEGATE_HPP_INCLUDED | |
#include <functional> | |
#include <vector> | |
// general case | |
template<typename R, typename... Args> | |
class delegate | |
{ |
#!/usr/bin/python | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#include <algorithm> | |
#include <iostream> | |
using namespace std; | |
#define ARR_LEN(arr) (sizeof(arr) / sizeof(arr[0])) | |
struct element { | |
int id; | |
int score; |