Skip to content

Instantly share code, notes, and snippets.

Avatar

Yoshiki Sato xight

  • Tokyo Gakugei University
  • 4-1-1 Nukuikita-machi, Koganei-shi, Tokyo 184-8501 Japan
View GitHub Profile
@xight
xight / config.patch
Last active Apr 17, 2021
config.sub (2018-04-24 -> 2021-01-08), config.guess (2018-03-08 -> 2021-01-25)
View config.patch
--- config.guess.bak 2021-04-04 21:56:53.000000000 +0900
+++ config.guess 2021-04-17 16:03:10.347268757 +0900
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2018 Free Software Foundation, Inc.
+# Copyright 1992-2021 Free Software Foundation, Inc.
-timestamp='2018-03-08'
+timestamp='2021-01-25'
@xight
xight / config.sub.patch
Created Apr 16, 2021
config.sub patch (2019-06-30 -> 2021-01-08)
View config.sub.patch
--- tool/config.sub.bak 2020-10-01 21:15:38.000000000 +0900
+++ tool/config.sub 2021-04-16 16:38:03.065331812 +0900
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2019 Free Software Foundation, Inc.
+# Copyright 1992-2021 Free Software Foundation, Inc.
-timestamp='2019-06-30'
+timestamp='2021-01-08'
@xight
xight / config-sub.patch
Last active Apr 16, 2021
config.sub patch (2018-04-24 -> 2021-01-08)
View config-sub.patch
--- config.sub.bak 2021-04-04 21:56:53.000000000 +0900
+++ config.sub 2021-04-16 15:56:41.149651959 +0900
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2018 Free Software Foundation, Inc.
+# Copyright 1992-2021 Free Software Foundation, Inc.
-timestamp='2018-04-24'
+timestamp='2021-01-08'
@xight
xight / gist:b2a32ca28a6e32e1ea7e0ada7964371f
Created Jun 18, 2018
Rename file to continuous number
View gist:b2a32ca28a6e32e1ea7e0ada7964371f
#!/bin/bash
extension='jpg'
prefix=`date +%Y-%m-%d`
count=1
for FILE in `find ./ -type f -name '*'.${extension} -maxdepth 1`;
do
mv $FILE ${prefix}-`printf '%04g\n' $count`.${extension}
@xight
xight / brew_cask_upgrade.fish
Last active Feb 12, 2017
brew_cask_upgrade.fish
View brew_cask_upgrade.fish
function brew_cask_upgrade
for app in (brew cask list)
set --local latest (brew cask info $app | awk 'NR==1{print $2}')
set --local versions (ls -1 "/usr/local/Caskroom/$app/.metadata/")
set --local current (echo $versions | awk '{print $NF}')
echo "app: $app"
echo "latest: $latest"
echo "versions: $versions"
echo "current: $current"
View git-gc-all.fish
function git-gc-all ✔
ghq list -p | xargs -P 1 -n 1 -I"{}" -t bash -c "cd {}; git gc;"
end
View set-proxy.sh
function set_proxy() {
export http_proxy=$1
export HTTP_PROXY=$1
export ftp_proxy=$1
export FTP_PROXY=$1
export all_proxy=$1
export ALL_PROXY=$1
export https_proxy=$1
export HTTPS_PROXY=$1
@xight
xight / pokemon.json
Last active Aug 8, 2016 — forked from shri/pokemon.json
JSON of pokemon to go with my pokemonMoves.json file
View pokemon.json
{
"1":{
"name":"Bulbasaur",
"attack":49,
"defense":49,
"evolveLevel":16,
"evolveTo":"2",
"type":"grass",
"moves":[
"tackle",
@xight
xight / Makefile
Created Jul 5, 2016
Makefile for TeX
View Makefile
FILENAME = FOOBAR
TEX = $(FILENAME).tex
DVI = $(FILENAME).dvi
AUX = $(FILENAME).aux
PDF = $(FILENAME).pdf
all:
make tex
make bibtex
make tex
@xight
xight / ppt-set-backgroud.bas
Last active Jun 8, 2016
PowerPointで指定したShapeを最背面にし、サイズをスライド一面にし、センタリングするマクロ
View ppt-set-backgroud.bas
Sub SetBackground()
targetNameArr = Array("Picture 6", "Content Placeholder 6")
Dim w As Integer
Dim h As Integer
w = ActivePresentation.PageSetup.SlideWidth
h = ActivePresentation.PageSetup.SlideHeight
Dim sld As Slide
Dim sh As Shape