Skip to content

Instantly share code, notes, and snippets.

View coolbrg's full-sized avatar

Budh Ram Gurung (BRG) coolbrg

View GitHub Profile
@coolbrg
coolbrg / tmux-cheatsheet.markdown
Created December 20, 2016 15:15 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@coolbrg
coolbrg / Fix Cygwin Issue with RubyGem
Created November 21, 2016 06:24 — forked from devcfgc/Fix Cygwin Issue with RubyGem
No such file or directory — /cygdrive/c/Ruby/bin/gem (LoadError)
//We must add the following to your .bashrc (C:\cygwin\home\user\.bashrc):
alias ruby='/cygdrive/c/Ruby21-x64/bin/ruby'
alias gem='/cygdrive/c/Ruby21-x64/bin/gem.bat'
alias irb='/cygdrive/c/Ruby21-x64/bin/irb.bat'
alias compass='/cygdrive/c/Ruby21-x64/bin/compass.bat'
alias sass='/cygdrive/c/Ruby21-x64/bin/sass.bat'
alias scss='/cygdrive/c/Ruby21-x64/bin/scss.bat'
@coolbrg
coolbrg / download.rb
Last active November 2, 2016 10:16 — forked from jonforums/download.rb
Ruby HTTP/HTTPS/FTP file downloader
#!/usr/bin/env ruby
# An HTTP/HTTPS/FTP file downloader library/CLI based upon MiniPortile's
# HTTP implementation.
#
# Author: Jon Maken
# License: 3-clause BSD
# Revision: 2012-03-25 23:01:19 -0600
require 'net/http'
require 'net/https' if RUBY_VERSION < '1.9'
@coolbrg
coolbrg / gist:7c419572eb35d3a604297b1c432437a9
Created October 1, 2016 08:51 — forked from cridenour/gist:74e7635275331d5afa6b
Setting up Vim as your Go IDE

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

#Run as root or add sudo at the beginning of each command
iptables -F
# Allow loopback
iptables -I INPUT 1 -i lo -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
@coolbrg
coolbrg / VagrantLauncher.java
Last active August 19, 2016 11:29 — forked from jeffmaury/VagrantLauncher.java
VagrantLauncher program for end-to-end test of ADB
import java.util.*;
import java.io.*;
class StreamGobbler extends Thread
{
InputStream is;
String type;
StreamGobbler(InputStream is, String type)
{
@coolbrg
coolbrg / kubernetes_steps.rst
Created August 10, 2016 07:41
Connect to kubernetes outside host
@coolbrg
coolbrg / kvm_cheatsheet.sh
Created July 30, 2016 08:16 — forked from mayurah/kvm_cheatsheet.sh
KVM / QEMU Cheatsheet
# List System(s)
virsh -c qemu:///system list
virsh list # List running
virsh list --all # List all
# Open guest VM console
virsh console <instance>
# Control specific instance
virsh start <instance>
@coolbrg
coolbrg / irc.md
Created February 29, 2016 06:02 — forked from xero/irc.md
irc cheat sheet

#IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

##The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.