Skip to content

Instantly share code, notes, and snippets.

View yyoshiki41's full-sized avatar
📻

Yoshiki Nakagawa yyoshiki41

📻
View GitHub Profile
@jrochkind
jrochkind / gist:2161449
Created March 22, 2012 18:40
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@matope
matope / Dynamo: Amazonの高可用性Key-value Store.markdown
Last active November 18, 2022 17:54
Dynamo: Amazonの高可用性Key-value Store[和訳]
@matope
matope / Cassandra - A Decentralized Structured Storage System.markdown
Created July 23, 2012 09:56
Cassandra - A Decentralized Structured Storage System[和訳]
@matope
matope / base_an_acid_alternative.markdown
Created November 25, 2012 02:44
BASE: An Acid Alternative[和訳]
@rtt
rtt / tinder-api-documentation.md
Last active June 21, 2024 04:19
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

#include <stdio.h>
#define N 1000
void initialize(long long int *r, long long int *s, long long int *y, long long int *x);
int
main(int argc, char* argv[])
{
// z: k + 1
@yutori
yutori / redis_cluster.md
Last active April 20, 2019 23:17
Redis Cluster のリシャーディングとorphaned masterの話 - CyberAgent エンジニア Advent Calendar 2014 2日目

Redis Cluster のリシャーディングとorphaned masterの話

(2019/04 追記 こちらの情報は非常に古く、またRC版での結果となります。記録として残していますが参考になさらないでください

CyberAgent エンジニア Advent Calendar 2014 2日目です。

昨日に引き続き、秋葉原ラボの柿島が担当します。仕事ではHadoopクラスタの運用を中心に、秋葉原ラボのインフラ/ミドルウェアまわりを担当しています。今年はHadoop、mesos、Aerospikeと分散型のシステムを触る機会が多い1年でした。

この記事のテーマはRedis Clusterです。Redis Clusterが使えるようになるRedis 3.0.0は10月にRC1がリリースされました。2015年のQ1にstableリリースを目指しているようです。

マージ済みのリモートブランチを全て削除

git branch -r --merged master | grep -v -e master -e develop | sed -e 's% *origin/%%' | xargs -I% git push --delete origin %
  1. remote の master に merge済み の branch をすべて表示して
  2. master と develop は消えてほしくないので除外して
  3. origin/ を削除して
  4. xargs (-I% % で ブランチ名を渡しつつ、全て削除する)
@hikarock
hikarock / twitter-gas.js
Last active December 30, 2020 04:42
twitter-gas.js
var PROJECT_KEY = '';
var TWITTER_CONSUMER_KEY = '';
var TWITTER_CONSUMER_SECRET = '';
function trigger() {
search('東京オリンピック', 0);
}
function reset() {
var service = getService();
# app
GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO app@'10.255.0.0/255.255.0.0' IDENTIFIED BY 'password'

# operator
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, REFERENCES ON *.* TO operator@'%' IDENTIFIED BY 'password'

# viewer
GRANT SELECT ON *.* TO viewer@'%' IDENTIFIED BY 'password'