Skip to content

Instantly share code, notes, and snippets.

🦄
Working

Anil Wadghule anildigital

🦄
Working
Block or report user

Report or block anildigital

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
View VS Code extensions I use.md
## VSCode Setup

I use following extensions
1. Ruby
2. Ruby Solargraph
2. VTools
2. Rails Run Specs
3. Rails Go to Spec
4. Local History
5. GitLens 
@anildigital
anildigital / dynamic_supervisor_example.ex
Created Feb 18, 2018
Simple Example for Dynamic Supervisor
View dynamic_supervisor_example.ex
defmodule Worker1 do
def start_link() do
Task.start_link(fn ->
Stream.repeatedly(fn -> :rand.uniform(1000) end)
|> Stream.each(&:timer.sleep/1)
|> Stream.each(fn _ -> IO.puts("worker 1") end)
|> Stream.run()
end)
end
end
View mjr2webm.sh
#!/bin/bash
set -e
function error {
>&2 echo $1
exit 1
}
# set defaults
ffmpegParams="-strict -2"
@anildigital
anildigital / mjr2mp4.sh
Created Dec 20, 2017
Neeed your inputs to fix this.
View mjr2mp4.sh
#!/bin/bash
set -e
function error {
>&2 echo $1
exit 1
}
# set defaults
ffmpegParams="-strict -2"
@anildigital
anildigital / JRuby.md
Last active Oct 7, 2017
PuneRb - JRuby talk - Saturday, October 7th, 2017
@anildigital
anildigital / carl_hewitt_actor_model.md
Created Aug 11, 2017 — forked from rbishop/carl_hewitt_actor_model.md
Notes from Carl Hewitt on the Actor Model
View carl_hewitt_actor_model.md

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
anildigital / libnice.rb
Created Apr 20, 2017
libnice formula (required by Janus Gateway)
View libnice.rb
class Libnice < Formula
desc "GLib ICE implementation"
homepage "https://wiki.freedesktop.org/nice/"
url "https://nice.freedesktop.org/releases/libnice-0.1.7.tar.gz"
sha256 "4ed165aa2203136dce548c7cef735d8becf5d9869793f96b99dcbbaa9acf78d8"
depends_on "pkg-config" => :build
depends_on "glib"
depends_on "gstreamer"
@anildigital
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
reboot
# Done
@anildigital
anildigital / install_janus.sh
Created Apr 7, 2017
Install Janus WebRTC Gateway on macOS
View install_janus.sh
brew install jansson libnice openssl libusrsctp libmicrohttpd libwebsockets cmake rabbitmq-c sofia-sip opus libogg glib pkg-config gengetopt
wget https://github.com/cisco/libsrtp/archive/v1.5.4.tar.gz
tar xvf v1.5.4.tar.gz
cd libsrtp-1.5.4
./configure --prefix=/usr/local/libsrtp
make
sudo make install
git clone git@github.com:meetecho/janus-gateway.git
You can’t perform that action at this time.