Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

kamal namdeo kamal-github

:octocat:
Focusing
Block or report user

Report or block kamal-github

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kamal-github
kamal-github / ZshSetup.md
Last active Oct 16, 2018
Zsh Setup with Ohmyzsh
View ZshSetup.md
@scanf
scanf / gs_gofmt.bash
Created Mar 17, 2017
Run gofmt on changed files
View gs_gofmt.bash
for x in `git status -s|awk '{ print $2}'`; do gofmt -w $x; done
View macvim_setup.md
View mgoTestExample.go
package main
import (
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"time"
)
type Content struct {
@kamal-github
kamal-github / nginxproxy.md
Created Feb 9, 2016 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@kamal-github
kamal-github / nginx-ssl-config
Created Feb 9, 2016 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
View nginx-ssl-config
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active Dec 6, 2019
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)
View iterm2-solarized.md

Default

Default

Powerlevel10k

Powerlevel10k

@jbub
jbub / squash-commits.sh
Created Jun 12, 2013
git squash last two commits into one
View squash-commits.sh
git rebase --interactive HEAD~2
# we are going to squash c into b
pick b76d157 b
pick a931ac7 c
# squash c into b
pick b76d157 b
s a931ac7 c
View gist:5469009
type T struct {
A int
B string
}
t := T{23, "skidoo"}
s := reflect.ValueOf(&t).Elem()
typeOfT := s.Type()
for i := 0; i < s.NumField(); i++ {
View redis_pubsub_demo.rb
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
You can’t perform that action at this time.