Skip to content

Instantly share code, notes, and snippets.

View angeloh's full-sized avatar
🎯
Focusing

Angelo Huang angeloh

🎯
Focusing
View GitHub Profile
@angeloh
angeloh / play.conf
Created October 7, 2013 03:55 — forked from leon/play.conf
# Upstart script for a play application that binds to an unprivileged user.
# put this into a file like /etc/init/play.conf
#
# This could be the foundation for pushing play apps to the server using something like git-deploy
# By calling service play stop in the restart command and play-start in the restart command.
#
# Usage:
# start play
# stop play
# restart play
@angeloh
angeloh / css-changes
Last active August 29, 2015 14:00
css-changes
.profile-two .column1 {
background: #3A3A3A;
}
.column3 {
background: #fafafa;
}
@angeloh
angeloh / index.html
Created May 10, 2014 23:12
realtime-channel javascript demo
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<title>Goodow Realtime Channel API Playground</title>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
@angeloh
angeloh / variable-property-attributes-or.html
Last active August 29, 2015 14:02
variable property attributes for ios
Credit @http://rdcworld-iphone.blogspot.in/2012/12/variable-property-attributes-or.html
Variable property attributes or Modifiers in iOS
Variable property attributes or Modifiers
Property Attributes Indicate Data Accessibility and Storage Considerations
Use Accessor Methods to Get or Set Property Values
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
150ml.com
15meg4free.com
163.com
sina.com
sina.cn
126.com
163.com
yeah.net
vip.sina.com
vip.126.com
vip.21cn.com
qq.com
foxmail.com
/**
The Play (2.3) json combinator library is arguably the best in the scala world. However it doesnt
work with case classes with greater than 22 fields.
The following gist leverages the shapeless 'Automatic Typeclass Derivation' facility to work around this
limitation. Simply stick it in a common location in your code base, and use like so:
Note: ** Requires Play 2.3 and shapeless 2.1.0
import SWrites._
import SReads._
@angeloh
angeloh / CameoPatterns.scala
Last active August 29, 2015 14:21
Cameo Patterns
/*
https://www.chrisstucchio.com/blog/2013/actors_vs_futures.html
First, I'd argue that you've excluded Akka's most important use case: Distribution. I would say
"Futures for Concurrency, Actors for State or Distribution." Location transparency is one of
Akka's most important use cases - if you use Actors infront of services, then you can deploy
your application in many discrete micro-services with ease, only changing configuration. For this,
you use actorSelection and pass the path so you can work on the app as one big piece and then
deploy it as 7.
@angeloh
angeloh / gist:e46fb6b903c40ca48508
Last active April 5, 2016 22:10 — forked from tankchintan/gist:1335220
Procedure for installing and setting Sun JDK Java 7 on Default Amazon Linux AMI
# First verify the version of Java being used is not SunJSK.
java -version
# Get the latest Sun Java SDK from Oracle
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.rpm
# Install Java
sudo rpm -i jdk-7u80-linux-x64.rpm
# Check if the default java version is set to sun jdk