Skip to content

Instantly share code, notes, and snippets.

Working from home

Anil Wadghule anildigital

Working from home
View GitHub Profile
anildigital /
Last active Oct 7, 2017
PuneRb - JRuby talk - Saturday, October 7th, 2017
anildigital /
Created Aug 11, 2017 — forked from rbishop/
Notes from Carl Hewitt on the Actor Model

Carl Hewitt on Actors

Actor - Fundamental unit of computation, a computation model - not just a form of concurrency

An Actor has three essential elements:

  • 1 - Processing - you have to get something done
  • 2 - Storage - you have to be able to remember things
  • 3 - Communication
View gist:88546abb2c1511a82702f0a87003fa0c

From Out of the Tar Pit:

The key problem with testing is that a test (of any kind) that uses one particular set of inputs tells you nothing at all about the behaviour of the system or component when it is given a different set of inputs. The huge number of different possible inputs usually rules out the possibility of testing them all, hence the unavoidable concern with testing will always be — have you performed the right tests?. The only certain answer you will ever get to this question is an answer in the negative — when the system breaks.

This is a strong argument for some form of generative, simulation, or property-based testing.

anildigital / libnice.rb
Created Apr 20, 2017
libnice formula (required by Janus Gateway)
View libnice.rb
class Libnice < Formula
desc "GLib ICE implementation"
homepage ""
url ""
sha256 "4ed165aa2203136dce548c7cef735d8becf5d9869793f96b99dcbbaa9acf78d8"
depends_on "pkg-config" => :build
depends_on "glib"
depends_on "gstreamer"
anildigital / fix_bad_fstab.txt
Created Apr 18, 2017
When you mess up with fstab (When your root becomes Read-only file system)
View fix_bad_fstab.txt
sudo mount -t tmpfs -o size=512M tmpfs /any_existing_dir_path
cd /any_existing_dir_path
cp /etc/fstab fstab
vi fstab
# Remove wrong fstab entry
sudo mount -T fstab -o remount,rw /dev/xvda1 /
sudo vim /etc/fstab
# Done
anildigital /
Created Apr 7, 2017
Install Janus WebRTC Gateway on macOS
brew install jansson libnice openssl libusrsctp libmicrohttpd libwebsockets cmake rabbitmq-c sofia-sip opus libogg glib pkg-config gengetopt
tar xvf v1.5.4.tar.gz
cd libsrtp-1.5.4
./configure --prefix=/usr/local/libsrtp
sudo make install
git clone
anildigital /
Created Feb 21, 2017
My acoustic setup
  • RHA MA750i (My daily driver)
  • ATH M50x (Listen sometimes at Home)
  • SONOS PLAY:1 (Regularly use it, mostly for Apple Music streaming, Beats 1 Radio)
  • FiiO A1 Portable Headphone Amplifier (Use it but not so frequently)
  • FiiO E11K (A3) Kilimanjaro 2 - (Use it with M50X but not so frequently)
  • Sony HT-RT3 5.1ch Home Theatre System with Bluetooth® (Use it actively with Apple TV [4th generation] & Sony PS4)
  • Sony NW-A35 Walkman (Got it recently and heavily using it)

I have collection of FLAC & 24bit music. I have almost complete A.R. Rahman FLAC collection, along with many other albums.

View event_example.rb
require 'concurrent'
event =
t1 = do
puts "t1 is waiting"
puts "event ocurred"
public void convertToXml(AnyObject object)
throws JAXBException, FileNotFoundException
JAXBContext contextObj = JAXBContext.newInstance( PnrRetrieveResult.class);
Marshaller marshallerObj = contextObj.createMarshaller();
marshallerObj.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshallerObj.marshal(object, new FileOutputStream( "/tmp/result.xml"));
System.out.println("Done ");
anildigital / DefaultKeyBinding.dict
Last active May 19, 2017 — forked from anonymous/DefaultKeyBinding.dict
Create this file ~/Library/KeyBindings/DefaultKeyBinding.dict
View DefaultKeyBinding.dict
"\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:";