Skip to content

Instantly share code, notes, and snippets.

View imom39a's full-sized avatar

Vinoth Kumar Shanmugam imom39a

View GitHub Profile
-- list all go deps
`go list -e -json -compiled .`
##
# sudo chmod 775 /usr/local/bin/checkwifi.sh
# crontab -e
# */5 * * * * /usr/bin/sudo -H /usr/local/bin/checkwifi.sh >> /dev/null 2>&1
##
## reboot on network failure
ping -c4 192.168.1.1 > /dev/null
if [ $? != 0 ]
import (
"crypto/md5"
"encoding/hex"
)
func GetMD5Hash(text string) string {
hasher := md5.New()
hasher.Write([]byte(text))
return hex.EncodeToString(hasher.Sum(nil))
}
How to ssh into a server
ssh-keygen
[enter]
[enter]
[enter]

cd ~/.ssh
ssh-copy-id -i id_rsa.pub USERNAME@SERVERTARGET
Brew Error: /usr/local must be writable
sudo chgrp -R admin /usr/local

sudo chmod -R g+w /usr/local
#!/bin/bash
CUR_DIR=$(pwd)
echo "\n\Pulling in latest changes for all module...\n"
for i in $(find . -name ".git" | cut -c 3-); do
echo "";
echo "current directory"+$i;
cd "$i";
@imom39a
imom39a / The Technical Interview Cheat Sheet.md
Last active September 11, 2016 13:27 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@imom39a
imom39a / GIF-Screencast-OSX.md
Created July 6, 2016 19:22 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: