Skip to content

Instantly share code, notes, and snippets.

View akouryy's full-sized avatar
💭
🐰

akouryy akouryy

💭
🐰
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>test page</title>
<style>
*{
font-family: "M+ 2p";
}
</style>
@akouryy
akouryy / dup.rb
Created November 2, 2014 02:07
remove duplication (backup: .dup directory)
# encoding utf-8
require 'fileutils'
i = 0
dir = ARGV[0] || ?.
moved = []
FileUtils.mkdir(dir + '/.dup')
@akouryy
akouryy / ぴょんぴょん.rb
Last active August 29, 2015 14:08
filter by tag
# encoding utf-8
# example:
# ruby ぴょんぴょん.rb -e png -e jpg -e gif -t シャロ -t チノ
# : .png or .jpg or .gif, シャロ or チノ
# ruby ぴょんぴょん.rb -o リゼシャロ --tag シャロ リゼ -千夜
# : シャロ and リゼ but 千夜, ./リゼシャロ/ will contain symlinks
require 'fileutils'
@akouryy
akouryy / A example
Last active August 29, 2015 14:08
A: tags, B: files
A = [
['6','千夜']
['7','シャロ']
['8','リゼ']
['9','ココア']
['0','チノ']
[]
['i','青山']
['o','マヤ']
['p','メグ']
1 2 3 v 3 2 1 ^
2 3 v 3 2 ^
3 v 3 ^
N > N ^
@akouryy
akouryy / jmc15-1.cpp
Last active August 29, 2015 14:11
jmc.miz-miz.biz
#include <algorithm>
#include <climits>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
@akouryy
akouryy / joi.rb
Last active December 12, 2015 03:51
$id = ARGV[0]
`g++ -Wall -std=c++11 -O2 #$id/program#$id.cpp`
1.upto 5 do |x|
puts "begin #{x}:\t" + File.read("#$id/2016-yo-t#$id-in#{x}.txt").lines.first.chomp + "..."
result = `a < #$id/2016-yo-t#$id-in#{x}.txt`
puts "end #{x}:\t\t" + result.lines.first.chomp + "..."
File.write "#$id/out#$id-#{x}.txt", result
end
#define times(n, i) for(auto i = remove_reference<decltype( (n) )>::type(0); i < (n); i++)
#define upto(f, t, i) for(auto i = remove_reference<decltype((t)-(f))>::type(f); i <= (t); i++)
#define downto(f, t, i) for(auto i = remove_reference<decltype((t)-(f))>::type(f); i >= (t); i--)
#define uptil(f, t, i) for(auto i = remove_reference<decltype((t)-(f))>::type(f); i < (t); i++)
#define downtil(f, t, i) for(auto i = remove_reference<decltype((t)-(f))>::type(f); i > (t); i--)
@akouryy
akouryy / pyon
Last active August 29, 2015 14:11
ul&li to table
* aa * b
* c
* d
* e * f * g
* h
* ii * j
* k
* l
[bad]
@akouryy
akouryy / jsdoit.css
Created December 22, 2014 14:24
pyonpyon-1
*{
font-family: serif;
}
#top{
display: table;
}
ul{
display: inline;