Skip to content

Instantly share code, notes, and snippets.

View xight's full-sized avatar

Yoshiki Sato xight

  • Tokyo Gakugei University
  • 4-1-1 Nukuikita-machi, Koganei-shi, Tokyo 184-8501 Japan
View GitHub Profile
@xight
xight / find_merged_cell.bas
Created July 1, 2015 13:30
find merged cell from worksheets
' usage
' Call("Sheet1", "A1", "Z100")
Sub findMergedCell(strWorkSheet As String, strStartCell As String, strEndCell As String)
Dim cl
Dim msg
Dim rng
rng = strStartCell & ":" & strEndCell
For Each cl In Worksheets(strWorkSheet).Range(rng)
@xight
xight / ppt-centering-shapes.bas
Last active June 8, 2016 05:11
PowerPointで指定した名前のShapeをセンタリングするマクロ
Sub CenteringShapes()
targetNameArr = Array("Picture 6", "Content Placeholder 6")
Dim sld As Slide
Dim sh As Shape
For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
For Each targetName In targetNameArr
If sh.Name = targetName Then
@xight
xight / ppt-set-backgroud.bas
Last active June 8, 2016 05:11
PowerPointで指定したShapeを最背面にし、サイズをスライド一面にし、センタリングするマクロ
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
@xight
xight / ppt-resize-shapes-to-fullsize.bas
Last active June 8, 2016 05:12
PowerPointで指定した名前のShapeをスライド全体にリサイズするマクロ
Sub ResizeShapesToFullsize()
Dim w As Integer
Dim h As Integer
w = ActivePresentation.PageSetup.SlideWidth
h = ActivePresentation.PageSetup.SlideHeight
Dim sld As Slide
Dim sh As Shape
targetNameArr = Array("Picture 6", "Content Placeholder 6")
@xight
xight / ppt-send-to-back.bas
Last active June 8, 2016 05:12
PowerPointで指定した名前のShapeを最背面に移動させるマクロ
Sub SendtoBack()
Dim sld As Slide
Dim sh As Shape
targetNameArr = Array("Picture 6", "Content Placeholder 6")
For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
For Each targetName In targetNameArr
If sh.Name = targetName Then
@xight
xight / Makefile
Created July 5, 2016 00:36
Makefile for TeX
FILENAME = FOOBAR
TEX = $(FILENAME).tex
DVI = $(FILENAME).dvi
AUX = $(FILENAME).aux
PDF = $(FILENAME).pdf
all:
make tex
make bibtex
make tex
@xight
xight / pokemon.json
Last active August 8, 2016 15:51 — forked from shri/pokemon.json
JSON of pokemon to go with my pokemonMoves.json file
{
"1":{
"name":"Bulbasaur",
"attack":49,
"defense":49,
"evolveLevel":16,
"evolveTo":"2",
"type":"grass",
"moves":[
"tackle",
@xight
xight / set-proxy.sh
Created October 28, 2016 07:58
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
function git-gc-all ✔
ghq list -p | xargs -P 1 -n 1 -I"{}" -t bash -c "cd {}; git gc;"
end
@xight
xight / brew_cask_upgrade.fish
Last active February 12, 2017 17:12
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"