Skip to content

Instantly share code, notes, and snippets.

View yuuichi-fujioka's full-sized avatar

yuuichi fujioka yuuichi-fujioka

View GitHub Profile
@yuuichi-fujioka
yuuichi-fujioka / install_java.sh
Last active September 29, 2015 06:15
install java
#!/bin/bash
sudo apt-get install python-software-properties -y
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer -y
@yuuichi-fujioka
yuuichi-fujioka / sudoers
Created February 27, 2014 05:50
no password when sudo
ubuntu ALL=(root) NOPASSWD: ALL
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
echo "deb http://pkg.jenkins-ci.org/debian binary/" | sudo tee /etc/apt/sources.list.d/jenkins.list
sudo apt-get update
sudo apt-get install jenkins
wget -q -O - https://foo/bar.sh | bash
@yuuichi-fujioka
yuuichi-fujioka / urldecode.sh
Created March 5, 2014 01:31
url encode and decode with shell
echo %E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%82%8F | tr = % | nkf -WwmQ
# Create Screen with window title
screen -S ${screen_name} -t ${window_title}
# Send text to input buffer with window title
screen -S ${screen_name} -p ${window_title} -X stuff $'echo hello\r'
# Send Ctrl c to window
screen -S ${screen_name} -p ${window_title} -X stuff $'\003'
# Send up to window
@yuuichi-fujioka
yuuichi-fujioka / rc.d_register.sh
Created March 10, 2014 03:15
regist service to rc.d
sudo update-rc.d <service name> defaults
@yuuichi-fujioka
yuuichi-fujioka / print full path.sh
Created March 13, 2014 00:08
get full path of sh
echo `readlink -f "${0}"`
import openpyxl
wb = openpyxl.Workbook()
wb.save(filename='/tmp/foo.xlsx')
@yuuichi-fujioka
yuuichi-fujioka / upstart.template.conf
Created April 4, 2014 03:53
upstart config file template
description "description of service"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
pre-start script
mkdir -p /var/run/${SERVICE_NAME}
end script
post-stop script