Skip to content

Instantly share code, notes, and snippets.

View trungie's full-sized avatar

Trung Hoang trungie

View GitHub Profile
@seamusjr
seamusjr / install.md
Created March 18, 2012 07:43
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, nvm

Setup new Mac with OSX Lion from scratch.

These commands are good as of 2012-03-18.

Install Xcode 4

The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.

Note: Make sure you install the XCode Command Line Tools after XCode is done installing. To do this go to Xcodes -> Preferences -> Downloads -> Command Line Tools -> Install. If you don't you might not be able to install brew packages (i.e. brew install wget will fail).*

@kjoconnor
kjoconnor / gist:2484425
Created April 24, 2012 22:50
Install puppet-server on Amazon Linux
1. Paste into /etc/yum.repos.d/puppetlabs.repo
[puppetlabs]
name=Puppet Labs - $basearch
baseurl=http://yum.puppetlabs.com/el/6Server/products/$basearch
failovermethod=priority
priority=0
enabled=0
2. rpm --import http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs
@bhenerey
bhenerey / ideal ops.md
Created May 23, 2012 19:40
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@Peksa
Peksa / MetricsPlugin.java
Created July 29, 2012 15:38
Codahale metrics with Play framework
package plugins;
import play.PlayPlugin;
import play.mvc.Http;
import play.mvc.Http.Request;
import play.mvc.Http.Response;
import play.mvc.Router.Route;
import play.vfs.VirtualFile;
import util.MetricsUtil;
@subelsky
subelsky / casperjs_example.js
Created August 8, 2012 18:51
Webscraping with CasperJS, PhantomJS, jQuery, and XPath
var system = require('system');
if (system.args.length < 5) {
console.info("You need to pass in account name, username, password, and path to casperJS as arguments to this code.");
phantom.exit();
}
var account = system.args[1];
var username = system.args[2];
var password = system.args[3];
@abeluck
abeluck / gpg-offline-master.md
Last active October 22, 2023 02:59 — forked from KenMacD/cmd.md
GPG Offline Master Key w/ smartcard
@liudong
liudong / gist:3993726
Created November 1, 2012 13:49
Java: Generate Public/Private Keys
import java.security.KeyPairGenerator;
import java.security.KeyPair;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.KeyFactory;
import java.security.spec.EncodedKeySpec;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.security.spec.InvalidKeySpecException;
import java.security.NoSuchAlgorithmException;
@Notalifeform
Notalifeform / play_portal
Last active December 16, 2015 10:09
play! framework 1.x init.d file - could need some tuning; use for inspiration only :-)
#!/bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@burgalon
burgalon / gist:5579233
Last active March 9, 2017 00:55
Filter all extra logs "by Log Tax (regex)" in IntelliJ for Android adb logcat that are not relevant to debugging an app
^(?!.*(PullToRefresh|SherlockFragmentActivity|IInputConnectionWrapper|LightsService|CalendarSyncAdapter|Watson|ActionBarSherlock|alsa_ucm|mm-camera|qcom_sensors_hal|CellInfoLte|WirelessDisplayService|TELEPHONY_CALLBACK|StatusBar.*|memalloc|AlarmManager|SIGNAL_ICON|StateMachine|ThermalDaemon|overlay|AudioTrack|Trace|SyncManager|libEGL|GCMBaseIntentService|SubscribedFeeds|PackageManager|StorageNotification|libgps|DownloadManager|MountService|ActivityThread|SpannableStringBuilder|AlertService|Gmail|SurfaceFlinger|PhoneStatusBar|MtpService|PicasaUploader|chromium|BackupHelperDispatcher|BackupManagerService|PerformBackupTask|KeyInputQueue|LocationMasfClient|KeyguardViewMediator|WindowManager|InputDevice|jdwp|RecognizerEngine|VoiceDialerReceiver|PackageIntentReceiver|installd|UNA|VoldCmdListener|UnlockClock|sensor_stub|PowerManagerService|ExchangeService|EventLogService|Finsky|Zygote|BatteryService|SntpClient|ActivityManager|CalendarProvider2|SyncCampaign|AlarmScheduler|StatusBarPolicy|NetworkStatusReceiver|KeyChar
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet