This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.alc.co.jp/dl/9590521/ | |
$ brew install rename | |
$ rename 's/(\d*)-(\d*) (.*).mp3/$1-$2.mp3/' *.mp3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://itunes.apple.com/lookup?id={$trackId}&country=JP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git init | |
$ git remote add -t \* -f origin [email protected]:username/repository-name.git | |
$ git checkout master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ htpasswd -cb .htpasswd username password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir backup | |
$ chmod 777 backup | |
$ mysql -u root | |
> USE [DATABASE_NAME]; | |
> SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('post_tag') INTO OUTFILE "/backup/post_tag.csv" FIELDS TERMINATED BY "," ENCLOSED BY "\"" LINES TERMINATED BY "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
doc = Nokogiri::HTML(open('http://www.onsen.ag')) | |
doc.xpath('//section[@id="movieList"]//div[@class="listWrap"]//ul[@class="clr"]//li').each do |node| | |
p node.xpath('h4[@class="listItem"]').inner_text | |
p node.xpath('p[@class="thumbnail listItem"]//img').attribute('src').text | |
break | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dir = './content/archives/'; | |
$filenames = []; | |
if ($handle = opendir($dir)) { | |
while (false !== ($filename = readdir($handle))) { | |
if ($filename != "." && $filename != ".." && strtolower(substr($filename, strrpos($filename, '.') + 1)) == 'md') { | |
$filenames[] = $filename; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sqlite3' | |
require 'fileutils' | |
require 'uri' | |
require 'net/http' | |
require 'json' | |
DIR = 'app/src/main/assets' | |
FILENAME = 'earthview.db' | |
def get_path(dir, filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php -S localhost:8080 -t public_html/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./bin/rails s | |
./bin/bundle install --path vendor/bundle | |
./bin/bundle exec rails g rspec:install | |
./bin/bundle exec rspec | |
./bin/rails runner -e development SampleWorker.task | |
curl -H "X-Access-Token: eyJ..." http://localhost:3000/api/v1/goods | |
curl -H "X-Access-Token: eyJ..." -X POST -d "" http://localhost:3000/api/v1/goods/1 | |
curl -H "X-Access-Token: eyJ..." -X POST -d count=1207 http://localhost:3000/api/v1/goods/1 |