Skip to content

Instantly share code, notes, and snippets.

View shinkbr's full-sized avatar
:shipit:
'"><svg/onload=alert()>{{7*7}}

Shintaro Kobori shinkbr

:shipit:
'"><svg/onload=alert()>{{7*7}}
View GitHub Profile
@shinkbr
shinkbr / uri.sh
Last active November 20, 2017 02:18
URI encode / decode strings.
#!/usr/bin/env bash
usage () {
echo "Usage: $( basename $0 ) <e|d>"
}
if [ "$#" -ne 1 ]; then
usage
exit 1
fi
@shinkbr
shinkbr / rand.sh
Last active January 21, 2018 18:41
generate random string with a given byte size
#!/usr/bin/env bash
num=4
if [[ "${1}" -gt "0" ]]; then
num="${1}"
fi
openssl rand -hex "${num}"
@shinkbr
shinkbr / configure-dock.sh
Last active December 14, 2022 18:38
Configure the macOS dock
#!/usr/bin/env bash
# Configure the macOS dock
defaults delete com.apple.dock
killall Dock
sleep 5
defaults write com.apple.dock autohide -bool yes
defaults write com.apple.dock minimize-to-application -bool yes
#!/usr/bin/env ruby
# coding: utf-8
h1 = Hash.new(0)
h1[:a] += 1
p h1 #=> {:a=>1}
h2 = Hash.new({a: 0})
h2[:a][:a] += 1
p h2 #=> {}
@shinkbr
shinkbr / private.xml
Last active August 29, 2015 14:11
private.xml for Karabiner
<?xml version="1.0"?>
<root>
<item>
<name>Control+[ to EISUU+Escape</name>
<identifier>private.lctrl_lbracket.escape_eisuu</identifier>
<autogen>
__KeyToKey__
KeyCode::BRACKET_LEFT, ModifierFlag::CONTROL_L,
KeyCode::ESCAPE, KeyCode::JIS_EISUU
</autogen>
@shinkbr
shinkbr / numbers.rb
Last active August 29, 2015 14:10
SECCON 2014 online qualifiers: Numbers
#!/usr/bin/env ruby
# coding: utf-8
require 'socket'
s = TCPSocket.open('number.quals.seccon.jp', 31337)
count = 1
while line = s.readline('?')
puts line
@shinkbr
shinkbr / kazuha_precure.sh
Last active August 29, 2015 14:01
パンツ先生のプリキュア芸術の取得
#!/bin/sh
# 実行したディレクトリにパンツ先生のプリキュア芸術の泉を爆誕させる
# http://diary.fc2.com/cgi-sys/ed.cgi/kazuharoom/
usage(){
echo "Usage: `basename $0` YEAR(yyyy) [MONTH(m)]"
exit 1
}