Skip to content

Instantly share code, notes, and snippets.

View ompugao's full-sized avatar

ompugao

View GitHub Profile
@ompugao
ompugao / git-submodule-fetch
Last active September 1, 2015 10:18 — forked from ianhinder/git-submodule-fetch
Parallel submodule fetch
#!/bin/bash
set -e
set -u
if [ $# -eq 0 ]; then
git submodule -q foreach 'echo $name' | xargs -n 1 -P 10 git-submodule-fetch
else
while [ $# -gt 0 ]; do
(cd $1; git fetch -q || echo "Failed to fetch $1">&2)

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@ompugao
ompugao / gollum.conf
Created September 7, 2012 14:30 — forked from leon/gollum.conf
Gollum Upstart script
#
# Install:
# install https://github.com/github/gollum
# in /srv/wiki do a git init
# add this script to /etc/init/gollum.conf
#
# Usage:
# start/stop/restart gollum
#
@ompugao
ompugao / extend.sh
Last active February 6, 2017 14:19 — forked from wvengen/extend.sh
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v '^eDP' | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v '^DP' |grep -v 'HDMI' | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
@ompugao
ompugao / cute_AA.txt
Created September 18, 2017 14:49 — forked from Tosainu/cute_AA.txt
顔文字詰め合わせ
あせ (・_・;) 顔文字
あせ (・∀・;) 顔文字
あせ (^ω^;;) 顔文字
あせ (゚∀゚ ;)タラー 顔文字
あたふた ヽ(´・ω・`ヽ)​ 顔文字
あつい (。>﹏<)あㄘ”ゅい 顔文字
あつい ι(´Д`υ)アジィー 顔文字
あつい あㄘ”ゅい(>﹏<。Ξ。>﹏<)あㄘ”ゅい 顔文字
あはは ( ゚∀゚)アハハ八八ノヽノヽノヽノ \ / \/ \ 顔文字
あひゃ アヒャヒャヒャ(゚∀゚≡゚∀゚)ヒャヒャヒャ 顔文字
@ompugao
ompugao / changeslope.py
Created July 30, 2018 07:54 — forked from 8bit-pixies/changeslope.py
Interactive tkinter matlibplot example.
import Tkinter
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.figure import Figure
class App:
def __init__(self, master):
# Create a container
frame = Tkinter.Frame(master)
# Create 2 buttons
self.button_left = Tkinter.Button(frame,text="< Decrease Slope",
@ompugao
ompugao / README.md
Created March 3, 2019 06:51 — forked from gunyarakun/README.md
旺文社『表現のための実践ロイヤル英文法』別冊付録「英作文のための暗記用例文300」JSON

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

@ompugao
ompugao / LICENSE
Created December 10, 2019 13:02 — forked from IshitaTakeshi/LICENSE
Huber weighted IRLS
Copyright (C) 2006, Jonathan E. Taylor
All rights reserved.
Copyright (c) 2006-2008 Scipy Developers.
All rights reserved.
Copyright (c) 2009-2018 statsmodels Developers.
All rights reserved.
@ompugao
ompugao / casadi_mpc.py
Last active October 8, 2021 02:56 — forked from mayataka/casadi_mpc.py
MPC via CasADi
from casadi import *
import math
import numpy as np
class MPC:
def __init__(self):
# 問題設定
T = 1.0 # ホライゾン長さ (MPCなので短め)
N = 20 # ホライゾン離散化グリッド数 (MPCなので荒め)