Skip to content

Instantly share code, notes, and snippets.

View kotashiratsuka's full-sized avatar

Kota Shiratsuka kotashiratsuka

View GitHub Profile
@karlhorky
karlhorky / migrate-repo-to-lfs.sh
Last active February 28, 2019 07:42
Migrate existing design git repo to large file storage with history
git filter-branch --prune-empty --tree-filter '
git lfs track "*.ai"
git lfs track "*.psd"
git lfs track "*.eps"
git lfs track "*.jpg"
git lfs track "*.png"
git lfs track "*.svg"
git add .gitattributes
git ls-files -z | xargs -0 git check-attr filter | grep "filter: lfs" | sed -E "s/(.*): filter: lfs/\1/" | tr "\n" "\0" | while read -r -d $'"'\0'"' file; do
@cucmberium
cucmberium / gist:e687e88565b6a9ca7039
Last active February 28, 2024 01:23
Twitterの検索API & Twitterでの検索術

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません

@pburkholder
pburkholder / gist:a9cdde0b33be8d5e3c08
Created February 20, 2015 02:00 — forked from tyler-ball/gist:f7c16e814265f34260e9
Shared examples in rspec/serverspec.....

Create the following folder structure in your cookbook:

test
└── integrationq
    ├── helpers
    │   ├── serverspec
    │   │   ├── shared_serverspec_tests
    │   │   │   └── shared_tests2.rb
    │   │   └── spec_helper.rb
@d11wtq
d11wtq / docker-ssh-forward.bash
Created January 29, 2014 23:32
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@voluntas
voluntas / shiguredo_tech.rst
Last active April 11, 2024 08:30
時雨堂を支える技術

時雨堂を支える技術

日時:2024-04-11
作:時雨堂
バージョン:2024.4
URL:https://shiguredo.jp/

時雨堂クラウドサービスを支える技術

@shimizukawa
shimizukawa / Cheffile
Created April 2, 2013 10:41
chefでCentOSにMySQL5.5以降をインストールしたい! -> fork版 mysql cookbookを使えばできる!(このgist) -> remi repository使えば yum install mysql-serverでいけるよ! http://tk0miya.hatenablog.com/entry/2013/04/03/141656 (新情報!!)
cookbook 'mysql',
:git => 'https://github.com/9minutesnooze/mysql.git',
:ref => 'mysql56'
@jotto
jotto / google_oauth2_access_token.rb
Created June 14, 2012 21:15
ruby command line script for generating google oauth2 access token
# (create oauth2 tokens from Google Console)
client_id = ""
client_secret = ""
# (paste the scope of the service you want here)
# e.g.: https://www.googleapis.com/auth/gan
scope = ""
@etienned
etienned / csstidy
Created May 25, 2012 18:28
CLI for the PHP version of CSSTidy
#!/usr/bin/env php
<?php
/**
* CSSTidy - Command Line Interface (CLI)
*
* Command Line Interface that try to mimic as much as possible the C++ CLI
* version of csstidy. It should be a drop in replacment for the C++ CLI that is
* no longuer maintain. New settings like css_level are added.
*
* Copyright 2005, 2006, 2007 Florian Schmitz
@grantr
grantr / gist:1105416
Created July 25, 2011 22:31
Chef mysql master/slave recipes
## mysql::master
ruby_block "store_mysql_master_status" do
block do
node.set[:mysql][:master] = true
m = Mysql.new("localhost", "root", node[:mysql][:server_root_password])
m.query("show master status") do |row|
row.each_hash do |h|
node.set[:mysql][:master_file] = h['File']
node.set[:mysql][:master_position] = h['Position']
end
@rahulkmr
rahulkmr / gmail_oauth.rb
Created May 14, 2011 01:02
Example - oauth for gmail.
require "sinatra"
require 'json'
require "oauth"
require "oauth/consumer"
require 'gmail_xoauth'
enable :sessions
before do
session[:oauth] ||= {}