Skip to content

Instantly share code, notes, and snippets.

View michaelcho's full-sized avatar

Michael Cho michaelcho

View GitHub Profile
@michaelcho
michaelcho / sample_response.json
Created August 10, 2015 08:43
Voat API - Sample JSON response for comments
View sample_response.json
{
"success": true,
"data": [
{
"id": 1663,
"parentID": null,
"submissionID": 162,
"subverse": "funnystuff",
"date": "2015-04-27T17:45:49.95",
"lastEditDate": null,
@michaelcho
michaelcho / testing-angular-rootscope
Last active August 29, 2015 14:08
How to test for $rootScope.$on (Jasmine, AngularJS controller)
View testing-angular-rootscope
Assuming I want to test:
$rootScope.$on 'rootScope:updateChargesAvoided', (event, chargesAvoided) ->
$scope.totalChargesAvoided = chargesAvoided
In my Jasmine test:
describe 'rootScope:updateChargesAvoided', () ->
beforeEach () ->
$injector.get('$rootScope').$broadcast('rootScope:updateChargesAvoided', data.charges)
View Install twiki with nginx on CentOS6.md

yum add EPEL

cd /tmp
wget http://mirror-fpt-telecom.fpt.net/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

install nginx fcgi-perl

yum install -y nginx fcgi-perl rcs