Skip to content

Instantly share code, notes, and snippets.

View chris-gunawardena's full-sized avatar

Chris Gunawardena chris-gunawardena

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Top reviewers</title>
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/darkly/bootstrap.min.css" rel="stylesheet" integrity="sha384-kVo/Eh0sv7ZdiwZK32nRsp1FrDT3sLRLx3zVpSSTI9UdO5H02LJNLBg5F1gwvKg0" crossorigin="anonymous">
</head>
<body>
@chris-gunawardena
chris-gunawardena / prepare-commit-msg
Created February 18, 2016 23:32
Goes inside /.git/hooks
#!/bin/bash
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
#echo $BRANCH_NAME
@chris-gunawardena
chris-gunawardena / Dockerfile
Last active February 3, 2016 23:31
Sportsbet Mobile web docker file
FROM node:0.12.9
MAINTAINER Chris Gunawardena <chris@gunawardena.id.au>
EXPOSE 4700
#INSTALL DEPS
RUN apt-get update
RUN apt-get install -y git ruby ruby-dev
RUN gem install compass
#FIREWALL WORKAROUND
using UnityEngine;
using System.Collections;
public class WebCam : MonoBehaviour {
WebCamTexture webcamTexture;
Renderer renderer;
// Use this for initialization
void Start () {
webcamTexture = new WebCamTexture();
{
fragment: 'racing',
foundRoute: 'racing(/)',
expectedTrackingData: {
sb_events_type: 'Racing'
}
},
{
fragment: 'horse-racing/todays-racing',
foundRoute: ':racingType-racing/todays-racing(/)',
@chris-gunawardena
chris-gunawardena / add_version_label_to_jira_issues_in_git_tag.sh
Created June 23, 2015 01:18
Add version label to all issues since last tag
#Get last tag
OLD_TAG=$(git describe $(git rev-list --tags --max-count=1))
#Bump version and tag
grunt version:patch
#Get new tag
NEW_TAG=$(git describe $(git rev-list --tags --max-count=1))
#Get all commit messages between new and old tags
COMMIT_MSGS_BETWEEN_TAGS=$(git log $OLD_TAG..$NEW_TAG --oneline)
#Add version label to all tickets in this build
#!/bin/bash
git stash
git checkout develop
git pull
#grunt build
#git commit -am "After grunt build"
OLD_TAG=$(git describe $(git rev-list --tags --max-count=1))
grunt version:patch
$ curl -v -u YOUR_TOGGL_API_KEY_FROM_MY_PROFILE_PAGE:api_token -H "Content-Type: application/json" -d '{"time_entry":{"description":"New time entry","created_with":"API example code","start":"2015-05-27T09:00:00+10:00","duration":28800,"pid":9981129}}' -X POST https://www.toggl.com/api/v8/time_entries
@chris-gunawardena
chris-gunawardena / prepare-commit-msg
Created May 22, 2015 01:18
Copy the attached ‘prepare-commit-msg’ file to \mobile\.git\hooks and it will automatically prepend the JIRA issue number to your commit message 
#!/bin/bash
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
#echo $BRANCH_NAME
@chris-gunawardena
chris-gunawardena / gist:f814ed5afd16f228dc14
Created May 12, 2015 04:12
List of stackoverflow questions with over 500 points
curl -sS "http://stackoverflow.com/questions/tagged/javascript?sort=featured&pageSize=50" --compressed
| grep +500
| sed 's/^.*\/questions\/\([0-9]*\)\/.*$/http:\/\/stackoverflow.com\/questions\/\1/'