Keisuke Izumiya
twitter @syguer
元インフラエンジニアで今はアプリケーションエンジニア歴1年半です
dropbox
if [ ! -d "DIR_NAME" ]; then mkdir "DIR_NAME";fi |
var randobet = function(n) { | |
var a = 'abcdefghijklmnopqrstuvwxyz' | |
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
+ '0123456789'; | |
a = a.split(''); | |
var s = ''; | |
for (var i = 0; i < n; i++) { | |
s += a[Math.floor(Math.random() * a.length)]; | |
} | |
return s; |
require 'aws-sdk' | |
AWS.config(:access_key_id => ACCESS_KEY, :secret_access_key => SECRET_KEY, :ec2_endpoint => REGION, :elb_endpoint => ELB_REGION) | |
@elb_client = AWS::ELB.new().client | |
# show description | |
@elb_client.describe_load_balancers({load_balancer_names: ["ELB_NAME"]}) | |
# get a lb |
dd if=/dev/zero of=tempfile bs=1M count="SOME SIZE" |
git br | grep -v master | xargs git br -D |
require 'oauth' | |
consumer = OAuth::Consumer.new( | |
"CONSUMER_KEY", | |
"CONSUMER_SECRET", | |
{ | |
site: "https://trello.com", | |
request_token_url: "https://trello.com/1/OAuthGetRequestToken", | |
authorize_url: "https://trello.com/1/OAuthAuthorizeToken", | |
access_token_url: "https://trello.com/1/OAuthGetAccessToken" |
Keisuke Izumiya
twitter @syguer
元インフラエンジニアで今はアプリケーションエンジニア歴1年半です
dropbox
#!/bin/sh | |
RESULT=$(ag binding.pry app/* lib/* | wc -l | sed -e 's/ //g') | |
if test $RESULT -gt 0; then | |
echo "binding.pry exists! Aborting." | |
exit 1 | |
fi | |
RESULT=$(ag console.log app/* lib/* | wc -l | sed -e 's/ //g') |
package main | |
import ( | |
"context" | |
"fmt" | |
"golang.org/x/oauth2" | |
"log" | |
) | |
func main() { |
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"golang.org/x/oauth2" | |
"io/ioutil" | |
) |