Skip to content

Instantly share code, notes, and snippets.

View anildigital's full-sized avatar
:octocat:

Anil Wadghule anildigital

:octocat:
View GitHub Profile
@anildigital
anildigital / stay_up_to_date_in_programming.md
Created March 17, 2016 14:02
Stay up to date in programming world
BUFFER_SIZE = 100
semaphore = Mutex.new
require 'thread'
queue = Thread::Queue.new
class Item
attr_reader :data
def initialize
{
"\UF729" = moveToBeginningOfParagraph:; // home
"\UF72B" = moveToEndOfParagraph:; // end
"$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
"$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end
// Emacs keybindings
"^ " = "setMark:";
"~d" = "deleteWordForward:";
"~w" = "copy:"; /* M-w */
"^w" = "deleteWordBackward:";

Hi Runners,

We are going to meet tomorrow at 6:40am outside Hyatt Regency Entrance gate.

We will do quick warm up.

Run starts at 7am sharp from outside Hyatt

Here is the route https://www.strava.com/routes/2996162

@anildigital
anildigital / gist:4fae9b51f1d416504899
Created July 26, 2015 17:44
Docker desktop on OSX
# https://github.com/docker/docker/issues/8710
brew install socat
brew cask install xquartz
open -a XQuartz
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"
# in another window
docker run -e DISPLAY=192.168.59.3:0 jess/geary
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
javascript: './public/javascripts/app.jsx'
},
output: {
path: __dirname + "/public",
filename: 'bundle.js'
@anildigital
anildigital / 0_reuse_code.js
Last active August 29, 2015 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@anildigital
anildigital / gist:78c882a48b46d140cfac
Created July 4, 2015 14:25
Git Object Model - Commands used
# Prints unique sha1 for the file
git hash-object data/number.txt
#Lists commit object ids
git rev-list --objects —all
# Lists out the git objects
find .git/objects -type f
# Lists files added to git index
@anildigital
anildigital / git_default_settings.md
Last active August 29, 2015 14:23
Useful Git commands and defaults

Show git branch name in Bash prompt

Put this line in your ~/.bashrc or ~/.bash_profile

export PS1="\h:\W \u\$(__git_ps1 \" (%s) \")\$ "

Configure shortcuts

git config --global alias.co checkout
@anildigital
anildigital / gist:9d56233ef8561b7eb1fc
Last active May 23, 2017 21:35
Connecting to WiFi automatically with OSMC after reboot

Steps

    1. sudo vi /etc/connman.conf
    1. Make sure you have following
   [General]
   PreferredTechnologies=wifi,ethernet