Skip to content

Instantly share code, notes, and snippets.

View OldBigBuddha's full-sized avatar
❤️
ℒℴѵℯ

Shinra Yamakawa OldBigBuddha

❤️
ℒℴѵℯ
View GitHub Profile
@OldBigBuddha
OldBigBuddha / formatter.py
Last active November 4, 2019 02:56
JSON形式の日本国憲法
"""
Copyright (c) 2019 OldBigBuddha.
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
"""
import jso
def get_provision(paragraphs: list, title: str) -> dict:
@OldBigBuddha
OldBigBuddha / FE-H29-aki.kt
Last active October 18, 2019 10:14
基本情報技術者試験 H.29 秋 問8
val chrList = listOf('␣', '.', ',', '?', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z')
val N = chrList.size
fun Int.isEven() = this%2 == 0
fun Int.isOdd() = this%2 == 1
fun generateCheckCharacter(input: String): String {
var sum = 0
for (i in input.length-1 downTo 0) {
sum += if ((input.length + i).isEven()) {
@OldBigBuddha
OldBigBuddha / list.md
Last active October 6, 2019 12:19
参加したイベント一覧
@OldBigBuddha
OldBigBuddha / Main.java
Created August 18, 2019 00:59
Pair for Java
// Paiza.io で動作確認済
// 2019/08/18
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Pair pair = returnPair();
System.out.println(pair.first);
System.out.println(pair.second);
@OldBigBuddha
OldBigBuddha / pronpt.zsh.backup
Created August 8, 2019 02:58
Zsh でコマンドタイポの際に正しいコマンドをサジェストしてくれる・ステータスを表示してくれる
### Prompt ###
OK="( ̄ー ̄)b"
NG="(ノд`@)"
PROMPT="%(?.%F{green}$OK%f.%F{red}$NG%f)
%F{magenta}%n%f@%c ->"
RPROMPT='${vcs_info_msg_0_}'
# もしかして時のプロンプト指定
SPROMPT="%{$fg[red]%}%{$suggest%}(*'~'%)? < もしかして %B%r%b %{$fg[red]%}かな? [そう!(y),違う!(n)]:${reset_color}:"
@OldBigBuddha
OldBigBuddha / .cvimrc
Last active August 4, 2019 11:57
cVim Setting
let locale = "jp"
let hintcharacters = "asdfghjklwertuioxcvnm"
set smoothscroll
set noautofocus
" Mappings
map l nextTab
map h previousTab
@OldBigBuddha
OldBigBuddha / matryoshka.sh
Last active June 16, 2019 19:17
CTF で遭遇する圧縮マトリョーシカに関するスクリプト
# ref: シェルスクリプト上で乱数を扱う方法まとめ3選 - かべぎわブログ - https://www.kabegiwablog.com/entry/2018/06/07/100000
#!/bin/sh
file_name=${1}
loop_count=${2}
while [ $loop_count -gt 0 ]
do
random=$((`od -An -tu2 -N2 /dev/random` % 3))
@OldBigBuddha
OldBigBuddha / trackpad
Created April 11, 2019 04:12
サスペンドするとき・終えるときのトラックパッドに関するモジュールの挙動
# /lib/systemd/system-sleep/ に移動する
# +x を忘れずに
# 参考: https://hello12world.ml/touchpad-not-working/
#! /bin/sh
case $1 in
pre)
rmmod psmouse
;;

Keybase proof

I hereby claim:

  • I am oldbigbuddha on github.
  • I am oldbigbuddha (https://keybase.io/oldbigbuddha) on keybase.
  • I have a public key ASCGiOwXMnyufV_o4v8-rKPm_FIMn_BTu4aZO_t_0eedwQo

To claim this, I am signing this object:

@OldBigBuddha
OldBigBuddha / cloudSettings
Last active July 26, 2019 03:05
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-07-26T03:05:46.672Z","extensionVersion":"v3.4.1"}