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 / tomcat.sh
Created March 8, 2016 02:58
Tomcat init script on CentOS box
#!/bin/bash
#
# description: Apache Tomcat init script
# processname: tomcat
# chkconfig: 234 20 80
#
#Location of JAVA_HOME (bin files)
export JAVA_HOME=/opt/java
@techgaun
techgaun / deusi-re.txt
Last active January 27, 2016 14:25
deusi bhattaune
ए भन मेर भाई हो, देउसी रे !
ए राम्ररी भन, देउसी रे !
ए स्वोर मिलाई भन, देउसी रे !
ए यो घर कत्रो, देउसी रे !
सिंह दरबार जत्रो, देउसी रे !
यो आँगन कत्रो, देउसी रे !
टुँडिखेल जत्रो, देउसी रे !
हामी त्यसै, देउसी रे !
आएका हैनौँ, देउसी रे !
बली राजा ले, देउसी रे !
#!/usr/bin/perl -w
# Author: Konrad "morsik" Mosoń <mosonkonrad@gmail.com>
# linked here: http://wiki.libvirt.org/page/Networking#Applying_modifications_to_the_network
use strict;
use warnings;
my $net = $ARGV[0];
@techgaun
techgaun / augeas-parse-network-scripts-ifcfg-team0-fix.md
Created October 10, 2015 18:59
Fix augeas parsing error for team0

Just quote TEAM_CONFIG with single quote instead of double quote

Error looks like below:

warning: augeas initialization had errors
please file a bug with the following lines in the bug report:
/augeas/files/etc/sysconfig/network-scripts/ifcfg-team0/error = "parse_failed"
/augeas/files/etc/sysconfig/network-scripts/ifcfg-team0/error/pos = "42"
/augeas/files/etc/sysconfig/network-scripts/ifcfg-team0/error/line = "4"
@techgaun
techgaun / s3-selected-bucket-policy.json
Created October 2, 2015 17:48
Allow S3 console access to single or selected bucket(s)
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
@techgaun
techgaun / vim8.x_with_lua
Last active March 30, 2024 22:09
Install vim with lua support on ubuntu 16.04
I needed to install vim with lua support because I wanted to use neocomplete in my recently installed 15.04 distro. Also, this has python3 enabled by default.
Tested on 16.04 now
Update: This has been tested and verified to work on Ubuntu 16.04 as well. Also, if you wish to use particular branch/tag, you can get the version and then checkout appropriately.
The following (based upon https://gist.github.com/jdewit/9818870) should work though I copied it from history:
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get build-dep vim-gnome
sudo apt-get install build-essential liblua5.3-0 liblua5.3-dev python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
@techgaun
techgaun / nginx-ssl-modern-cryptography.conf
Created August 25, 2015 10:39
An example nginx config with ssl using modern cryptography
server {
listen 443 ssl default;
ssl_certificate /etc/nginx/bundle.crt;
ssl_certificate_key /etc/nginx/privkey.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';

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

//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
@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
}