Skip to content

Instantly share code, notes, and snippets.

View hendragunz's full-sized avatar

Hendra Gunawan hendragunz

  • Tangerang, Indonesia
  • 03:24 (UTC +07:00)
View GitHub Profile
@hendragunz
hendragunz / brew-permission.sh
Created March 21, 2017 10:51
Setup brew for multiple users (in admin group)
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@hendragunz
hendragunz / clock.rb
Last active August 29, 2015 14:15 — forked from ziweizhou/clock.rb
require File.expand_path('../../config/boot', __FILE__)
require File.expand_path('../../config/environment', __FILE__)
require 'clockwork'
include Clockwork
every(1.day, 'Yearly Carry Job', :if => lambda { |t| t.day == 1 and t.month == 1}, :at => '0:00'){
now = Time.zone.now
if now.month == 1 and now.day == 1
# clean sick days and personal days
# ~/.gemrc
---
:verbose: true
:bulk_threshold: 1000
install: --no-ri --no-rdoc --env-shebang
:sources:
- http://gemcutter.org
- http://gems.rubyforge.org/
- http://gems.github.com
:benchmark: false
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"