Skip to content

Instantly share code, notes, and snippets.

View techgaun's full-sized avatar
🌌
Enum.random(["code", "sleep", "eat", "fifa", "soccer", "guitar", "board games"])

Samar Dhwoj Acharya techgaun

🌌
Enum.random(["code", "sleep", "eat", "fifa", "soccer", "guitar", "board games"])
View GitHub Profile
@techgaun
techgaun / git-tips.md
Last active August 29, 2015 14:09
Collection of miscellanous git tips

Collection of miscellanous git tips

Get current branch

git rev-parse --abbrev-ref HEAD
git symbolic-ref --short HEAD #probably works for 1.8 and newer clients
@techgaun
techgaun / graphicmagick-amzn-linux
Created November 13, 2014 20:02
Install GraphicMagick in Amazon Linux
#!/bin/bash
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.20.tar.gz
tar xfz ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.20.tar.gz
cd GraphicsMagick-1.3.20
./configure
make
make install
@techgaun
techgaun / prepare-commit-msg
Created November 13, 2014 20:47
Prepare-commit-msg hook for github + Pivotal Tracker Integration
#!/usr/bin/env node
/*
* Author: Samar Acharya <samar@techgaun.com>
* Place it in .git/hooks and chmod +x .git/hooks/prepare-commit-msg
* Based on http://www.ipreferjim.com/2013/04/git-prepare-commit-msg-with-node-js/
*/
var exec = require('child_process').exec,
util = require('util'),
@techgaun
techgaun / mailsend-install-amazon-linux.sh
Created November 28, 2014 11:08
Install mailsend on centos, rhel, amazon linux
#!/bin/bash
#installs https://github.com/muquit/mailsend
#tested on amzn linux
git clone git@github.com:muquit/mailsend.git mailsend
cd mailsend
git checkout 1.17b14
yum install -y openssl-devel
./configure --with-openssl=/usr/
make && make install
@techgaun
techgaun / node-modules-sec-check.sh
Created December 9, 2014 12:25
Check security vulnerabilities of node module you are using
#!/bin/bash
#go inside your node_modules folder and run this script
for module in *;
do
version=$(grep '"version":' $module/package.json | cut -d"\"" -f4);
echo "testing $module-v$version";
curl "https://nodesecurity.io/validate/$module/$version";
echo "";
done
language: c
env:
global:
- "HOST_IP=$(/sbin/ifconfig venet0:0 | grep 'inet addr' | awk -F: '{print $2}' | awk '{print $1}')"
- DOCKER_HOST=tcp://$HOST_IP:2375
- DOCKER_PORT_RANGE=2400:2500
- SLIRP_PORTS=$(seq 2375 2500)
before_install:
@techgaun
techgaun / sysctl.conf
Created February 24, 2015 13:36
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@techgaun
techgaun / nginx-redirect
Created June 28, 2015 18:24
Redirect all http domains to https
server {
listen 80 default deferred;
server_name domain.tld;
return 301 https://$host$request_uri; # $host - http://wiki.nginx.org/HttpCoreModule#.24host
# $host does not include port
}
//required node modules
//untested
var request = require('request');
var cheerio = require('cheerio');
var fs = require('fs');
var s3 = require('s3');
var AWS = require('aws-sdk');
var url = 'https://medium.com/@benjaminhardy/8-things-every-person-should-do-before-8-a-m-cc0233e15c8d'; //url of site

Useful Open-Source Unity Assets

This is a compilation of various open-source Unity plugins, codebases, or utility scripts that may aid in expediting the development process.

Art / Design Tools

ProbePolisher - Light Probe Editor - keijiro

"ProbePolisher is a Unity Editor plugin for editing light probes. It works both on Unity Basic (free) and Unity Pro."

Code
Releases