Skip to content

Instantly share code, notes, and snippets.

View yogendra's full-sized avatar

Yogendra Rampuria - Yogi yogendra

View GitHub Profile
@yogendra
yogendra / docker-cleanup.sh
Last active January 28, 2016 16:46
Vagrant scripts
$(docker ps -a -q -f status=exited) | xargs -r docker rm -v
docker rm -v $(docker ps -a -q -f status=exited)
docker rmi $(docker images -f "dangling=true" -q)
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes
@yogendra
yogendra / README.md
Last active January 29, 2019 17:13
Boilerplate linux scripts. Mostly provisioners for Vagrant

Setup linux OS Scripts

Most of these scripts are run as sudo.

Example:

curl -L "https://gist.github.com/yogendra/7d23440d2d139cf8d426/raw/setup-ubuntu-docker.sh" | sudo bash

Or

wget -qO- "https://gist.github.com/yogendra/7d23440d2d139cf8d426/raw/setup-ubuntu-docker.sh" | sudo bash
@yogendra
yogendra / brew-install-ffmpeg.sh
Created March 13, 2016 21:02
OS X Important Setup Commands
brew reinstall ffmpeg --with-rtmpdump --with-libass --with-opencore-am --with-openjpeg --with-openssl --with-libssh --with-schroedinger --with-ffplay --with-tools --with-fdk-aa --with-libvidstab --with-x265 --with-libsoxr --with-webp --with-zeromq --with-snappy --with-dcadec --with-rubberband --with-zimg --with-openh264
@echo on & @setlocal enableextensions
@echo =========================
@echo Turn off the time service
net stop w32time
@echo ======================================================================
@echo Set the SNTP (Simple Network Time Protocol) source for the time server
w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org"
@echo =============================================
@echo ... and then turn on the time service back on
net start w32time
@yogendra
yogendra / highlight-selected-text.js
Last active September 14, 2017 09:16
Simple Scripts to Modify HTML Content
(function(module){
if(window[module.name]){
return;
}
module.init();
window[module.name] = module.run;
})({
name: "highlightSelection",
init : function(){
var css = document.createElement('link');
@yogendra
yogendra / Readme.md
Last active October 14, 2017 14:29
Puppeteer Notes
@yogendra
yogendra / dc_trace_cmd.sh
Last active October 14, 2017 04:28
Docker Helper
#!/bin/sh
parent=`docker inspect -f '{{ .Parent }}' $1` 2>/dev/null
level=${2:-1}
echo ${level}: `docker inspect -f '{{ .ContainerConfig.Cmd }}' $1 2>/dev/null`
level=$((level+1))
if [ "${parent}" != "" ]; then
echo ${level}: $parent
$0 $parent $level
fi
@yogendra
yogendra / matching.js
Created January 30, 2018 13:36
Mongo Find (Un)matching documents in 2 collections
use db1
db.createCollection("scrapped");
db.scrapped.insert(
[
{ sku: "12345" },
{ sku: "23456" },
{ sku: "34567" },
{ sku: "45678" },
<irplus><!-- protocol = RC6-6-28, device = 0, subdevice = 2074, obc = 12, misc = T=0 -->
<device manufacturer="Panasonic" model="TH-55CX700" format="PRONTO_HEX" columns="3">
<button label="HDMI 1" span="4">0000 006C 0000 0032 0084 0043 0011 0011 0011 0033 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0033 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0033 0011 0011 0011 0011 0011 0033 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0033 0011 0033 0011 0011 0011 0033 0011 0011 0011 0011 0011 0033 0011 0011 0011 0033 0011 0033 0011 0011 0011 0011 0011 0B1E</button>
<button label="HDMI 2" span="4">0000 006C 0000 0032 0084 0043 0011 0011 0011 0033 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0033 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0011 0
@yogendra
yogendra / @SSH.md
Last active January 29, 2019 10:11
SSH Keys

My Public Keys for SSH