Skip to content

Instantly share code, notes, and snippets.

cannorin

Block or report user

Report or block cannorin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hungry.metaml
// type <T> ... code of T
//
// <~<t>> -> <t>
// run <t> -> t
let hungry i =
let rec f i =
match i with
| 0 -> < () >
View pdf2minibook
#!/bin/bash
[ $# -eq 0 ] &&
{
echo "Usage: pdf2minibook filename"
exit 0
}
[ -f $1 ] ||
{
echo "pdf2minibook: $1 not found"
@cannorin
cannorin / exehandler
Last active Dec 10, 2015
exe file handler for linux
View exehandler
#!/bin/bash
[ $# -eq 0 ] &&
{
echo "Usage: exehandler filename"
exit 0
}
[ -f $1 ] ||
{
echo exehandler: $1 not found
View twikesi.cs
using CoreTweet.Streaming;
var q = new Queue<Status>();
var buffer = 1000;
foreach(var t in tokens.Streaming.User())
{
if(t is StatusMessage)
{
if(q.Count >= buffer) q.Dequeue();
View coretweet.cs
// CoreTweet for Shell
//
// Required Files:
// CoreTweet.Streaming.Reactive.dll CoreTweet.dll Newtonsoft.Json.dll
//
// * Place this script and required dlls into $HOME/.scripts/csharp .
// * You need a consumer key and a consumer secret key.
// * Your data will be saved to $HOME/.twtokens .
// * Your tokens will be appear as an variable 'tokens' and 'apponly'.
View fetch_youtube_playlist.sh
album_title="Album Name"
album_artist="V. A."
album_cover="cover.png"
playlist="https://www.youtube.com/playlist?list=y0urp1ay1ist"
output_d="/path/to/directory"
youtube-dl $playlist -x --audio-format mp3 -o "%(title)s.%(ext)s" -i --download-archive "$album_title.plarchive"
mkdir -p "$output_d"
for i in *.mp3; do
mv "$i" "$output_d";
View a.fs
// 擬似コードです
type CmpResult =
True of Int | False
let > (x : CmpResult, y : CmpResult) : CmpResult =
match (x, y) with
(True m, True n) when Int.> m n -> CmpResult.True m
| (_, _) -> CmpResult.False
View statusdata.txt
200,100,90,81,72,90,72,72,91
206,100,100,90,80,100,80,80,97
212,100,110,99,88,110,88,88,103
218,100,120,108,96,120,96,96,108
224,100,130,117,104,130,104,104,114
230,100,140,126,112,140,112,112,120
236,100,150,135,120,150,120,120,125
242,100,160,144,128,160,128,128,131
248,100,170,153,136,170,136,136,137
254,100,180,162,144,180,144,144,143
View skilldata.txt
HPアップ1 P HP + 3 6 10 14 18 23 28 34 40 50
HPアップ2 P HP + 4 9 14 19 25 31 39 50 62 75
HPアップ3 P HP + 5 11 18 26 35 45 56 68 81 100
打撃アップ1 P S_ATK + 3 6 10 14 18 23 28 34 40 50
打撃アップ2 P S_ATK + 4 9 14 19 25 31 39 50 62 75
打撃アップ3 P S_ATK + 5 11 18 26 35 45 56 68 81 100
技量アップ1 P DEX + 3 6 10 14 18 23 28 34 40 50
打撃防御アップ1 P S_DEF + 3 6 10 14 18 23 28 34 40 50
ソードギア P OTHER - 0
ワイヤードランスギア P OTHER - 0
You can’t perform that action at this time.