Skip to content

Instantly share code, notes, and snippets.

View mk2's full-sized avatar
💭
Internet

Haruka Asakura mk2

💭
Internet
View GitHub Profile
@mk2
mk2 / dl.sh
Created May 9, 2016 15:10
Lets download mp4
wget -r -l2 -A.mp4 http://...
@mk2
mk2 / GIF-Screencast-OSX.md
Created April 25, 2016 11:25 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@mk2
mk2 / programming_games.md
Created April 12, 2016 07:56
プログラミングゲーム一覧メモ
@mk2
mk2 / file0.txt
Created March 26, 2016 14:39
aviファイルとかを連番の画像に書き出す ref: http://qiita.com/mk2/items/595e211b947f63f6eafd
.
├── aviutl.exe
├── aviutl.ini
├── aviutl.sav
├── aviutl.txt
├── aviutl.vfp
├── batch0.aup
├── bmp_output.auo
├── ds_input.ini
└── plugins
@mk2
mk2 / file0.txt
Created March 21, 2016 03:14
NimをOSXでインストール ref: http://qiita.com/mk2/items/2b14cd88926ce45b9473
brew remove nim # 一回入れてた場合は消す
cd Github/Nim/
git clone --depth 1 https://github.com/nim-lang/csources
cd csources && sh build.sh # installとかはしない、binに吐き出されるバイナリだけ使う
nano .bash_profile # PATHに追加
@mk2
mk2 / file0.txt
Last active October 4, 2015 10:53
[和訳] Updating 3.x Manifests for Puppet 4.x ref: http://qiita.com/mk2/items/830fba9871f12ff59492
if str2bool("$is_virtual") { ... }
@mk2
mk2 / tokenizer.rs
Last active January 5, 2018 13:10
//! Tokenizer related module
//!
//!
use super::token::{Token, Kind, Place, LineNum, Pos, Length};
use std::str::Chars;
#[allow(dead_code)]
pub struct Tokenizer<'a> {
pub lines : &'a str,
@mk2
mk2 / token.rs
Last active August 29, 2015 14:25
pub type LineNum = u16;
pub type Pos = u32;
pub type Length = u8;
#[allow(dead_code)]
#[derive(Debug, Clone)]
pub enum Kind {
/// ident token
@mk2
mk2 / serf_query_block_test.md
Created June 28, 2015 09:52
serf query block test

Executin commands

# start first serf agent
$ serf agent -event-handler=query:qh1=./qh1.sh -event-handler=query:qh2=./qh2.sh -bind=0.0.0.0:7946 -rpc-addr=127.0.0.1:7373
@mk2
mk2 / alfred_with_total_terminal.md
Created June 24, 2015 03:23
Alfred + TotalTerminal メモ

Create workflow

  1. Click "+" button on the left bottom corner in the workflow tab at the alfred window
  2. Select "Blank Workflow" menu item
  3. Filling some inputs with arbitrary data
  4. Click "+" button on the right top corner in the workflow tab at the alfred window
  5. Select "Input" menu and select "Keyword" menu
  6. Got to see the drawer, fill some inputs and save
  7. Select "Actions" menu and select "Run NSAppleScript" menu
  8. Paste the following applescript code with your own modification