Skip to content

Instantly share code, notes, and snippets.

View luizs81's full-sized avatar
🏠
Working from home

Luiz Gustavo M. Sampaio luizs81

🏠
Working from home
View GitHub Profile
@nownabe
nownabe / .commit_template
Created July 5, 2016 06:54
Emojiで楽しく綺麗なコミットを手に入れる
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善
#!/usr/bin/perl
#
# Tokyo Metro Open Data API test code
#
# author : Masashi Haraki
#
use strict;
use warnings;
@FUT
FUT / install-redis.sh
Last active April 19, 2022 11:16
Install Redis on EC2
1. Install Linux updates, set time zones, followed by GCC and Make
sudo yum -y update
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
/etc/localtime
sudo yum -y install gcc make
2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download)
@iamFIREcracker
iamFIREcracker / validateForeignKey
Created October 23, 2011 09:50
CakePHP function which validate foreign keys
/**
* Check if a given foreign key exists in the model (given its name).
*/
public function validateForeignKey($field){
$associations = array_map(
create_function('$v', 'return $v["foreignKey"];'),
$this->belongsTo
);
$aliases = array();