Skip to content

Instantly share code, notes, and snippets.

:octocat:
Working from home

Anil Wadghule anildigital

:octocat:
Working from home
View GitHub Profile
@anildigital
anildigital / README
Created May 4, 2020 — forked from mremond/README
Phoenix Elixir framework with ejabberd - Tutorial
View README
Please read original blog post for reference:
http://blog.process-one.net/embedding-ejabberd-into-an-elixir-phoenix-web-application/
@anildigital
anildigital / cleanup_swap.md
Last active Apr 27, 2020
Cleanup swap space on macOS
View cleanup_swap.md

To see current swap usage

sysctl -a | grep swap

Use only when when your system is in a very bad shape

$ sudo pkill -HUP -u _windowserver 
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:";
View janus-packer.json
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"region": "us-east-1"
},
"builders": [
{
"access_key": "{{user `aws_access_key`}}",
"ami_name": "packer-linux-janus-{{timestamp}}",
View List of companies using Ruby on Rails.md

List of companies using Ruby on Rails

  • figma.com
  • tesla.com (Tesla motors)
  • meetup.com
  • dribbble.com
  • fiverr.com
  • basecamp.com
  • notonthehighstreet.com
  • goodreads.com
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
You can’t perform that action at this time.