Skip to content

Instantly share code, notes, and snippets.

View binodluitel's full-sized avatar

Binod Luitel binodluitel

  • StackPath
  • Dallas, Texas
View GitHub Profile
@binodluitel
binodluitel / openconnect.md
Created March 4, 2019 18:15 — forked from moklett/openconnect.md
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect

@binodluitel
binodluitel / map.sh
Created January 2, 2018 21:50
create/use map in shell script
#!/usr/bin/env bash
# put a key/value in map
# usage: map_put map_name key value
map_put() {
[ "$#" != 3 ] && exit 1
alias "${1}$2"="$3"
}
# get a value from map
@binodluitel
binodluitel / coverage.sh
Created May 17, 2017 22:14
Golang test coverage
#!/usr/bin/env bash
SCRIPTS_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
PROJECT_PATH="$(dirname "$SCRIPTS_PATH")"
TEST_OUTPUT_PATH=${PROJECT_PATH}/test-reports
COV_PATH=${TEST_OUTPUT_PATH}/coverage
COV_OUT=${COV_PATH}/cover.out
COV_HTML=${COV_PATH}/cover.html
@binodluitel
binodluitel / mage-set-perms
Created April 25, 2017 02:14 — forked from amineasli/mage-set-perms
Setup Magento permissions/ownership following the recommendations of the official article : http://devdocs.magento.com/guides/m1x/install/installer-privileges_after.html
#!/bin/bash
#Check root access
if [ "$UID" != 0 ]
then
echo "This shell script must be run as root."
exit 2
fi

Keybase proof

I hereby claim:

  • I am binodluitel on github.
  • I am binodluitel (https://keybase.io/binodluitel) on keybase.
  • I have a public key whose fingerprint is 9BFD 2FA6 6908 C200 57F0 162C 1B90 4CB5 53C2 4C91

To claim this, I am signing this object:

package main
import (
"github.com/streadway/amqp"
"log"
"os"
"os/signal"
"runtime"
"syscall"
"time"