Skip to content

Instantly share code, notes, and snippets.

View kissge's full-sized avatar
😮‍💨
優秀エンジニア手伝ってくれたのむ

Yusuke Kido kissge

😮‍💨
優秀エンジニア手伝ってくれたのむ
View GitHub Profile
@kissge
kissge / gist:7113316
Last active December 26, 2015 07:09
ISE synthesis watcher
#!/bin/sh
while true; do
while [ -z "$(top -bn1 | grep -E ' (xst|xlicmgr|ngcbuild|xtclsh|ngdbuild|map|par|trce|bitgen)' | grep -v 'defunct')" ]; do
echo "Not Running\033[1A"
sleep 5
done
paplay $1 &
@kissge
kissge / wikipedia.js
Created March 17, 2014 15:14
Wikipedia scraper
// usage: node wikipedia.js バールのようなもの 鈍器
var scraper = require('scraper');
var fs = require('fs');
process.argv.forEach(
function (v, i)
{
if (i < 2) return;
scraper('http://ja.wikipedia.org/wiki/' + v,
function (err, $)
@kissge
kissge / run.vbs
Created March 31, 2014 14:59
Launch everything without the black evil window
'Usage: run.vbs "notepad run.vbs"
Set ws = WScript.CreateObject("Wscript.Shell")
command = "wonderful.bat " & WScript.Arguments(0)
'MsgBox command
ws.Run command, 0
Set ws = Nothing
@kissge
kissge / is_eri23.js
Created April 18, 2014 12:37
is_eri23 checker
var request = require("request");
var url = 'https://twitter.com/users/username_available?context=signup&username=is_eri23';
request({ url: url, json: true },
function (error, response, body)
{
if (!error && response.statusCode === 200 && body.valid)
console.log('is_eri23 available!');
});
\begin{tikzpicture}[scale=0.2]
\tikzstyle{every node}+=[inner sep=0pt]
\draw [black] (38,-6.2) circle (3);
\draw (38,-6.2) node {$1$};
\draw (43,-6.2) node {$1$};
\draw [black] (27.8,-14.3) circle (3);
\draw (27.8,-14.3) node {$2$};
\draw (32.8,-14.3) node {$2$};
\draw [black] (48.5,-14.3) circle (3);
\draw (48.5,-14.3) node {$3$};
@kissge
kissge / hist.from.freq.R
Created July 26, 2014 12:53
Create a histogram from frequency list
hist.from.freq <- function (range, freq, normalize = F, main = "Histogram") {
wid <- s[2] - s[1]
range <- range - wid / 2
range[length(range) + 1] <- range[length(range)] + wid
if (normalize) freq <- freq / sum(freq)
dat <- list(breaks = range, counts = freq)
attr(dat, "class") <- "histogram"
plot(dat, main = main, ylab = ifelse(normalize, "Probability", "Frequency"))
}
@kissge
kissge / autokey
Created October 27, 2014 11:52
AutoKey
[
{
"folders": [],
"usageCount": 9,
"modes": [],
"abbreviation": {
"ignoreCase": false,
"wordChars": "[\\w]",
"immediate": false,
"abbreviation": null,
@kissge
kissge / .tmux.conf
Created October 28, 2014 12:29
.tmux.conf
set mouse-utf8 on
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
@kissge
kissge / ctf.md
Last active August 29, 2015 14:10
SECCON CTF 2014 Problem list
Problem Title
Start100 Welcome to SECCON
Binary100 Reverse it
Binary100 Shuffle
Binary200 Let's disassemble
Crypto100 Easy Cipher
Crypto200 Decrypt it (Easy)
Crypto300 Decrypt it (Hard)
Crypto400 Ms.Fortune? Misfortune. : 4096-bit RSA
@kissge
kissge / acm-rescue.js
Created December 11, 2014 07:08
ACM Rescue
l=location;l.href='//dl.acm.org/citation.cfm?id='+l.href.split('/')[5]
// 70 bytes
/*
ACM DLの論文PDFをブラウザで開いているとき,そのままシャットダウンし,次に起動してタブを復元しても
セッションが切れているか何かでファイルが開けず,元のファイルへのリンクも見当たらないという問題があるが
それへの対処に使えるbookmarklet.
*/