Skip to content

Instantly share code, notes, and snippets.

🐧
I may be slow to respond. I don't check notifications often.

Vaibhav Yenamandra vaibhav-y

🐧
I may be slow to respond. I don't check notifications often.
Block or report user

Report or block vaibhav-y

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 dokku report <app> output
-----> uname: Linux umi 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
total used free shared buff/cache available
Mem: 985 211 123 1 650 618
Swap: 0 0 0
-----> docker version:
Client:
Version: 18.09.5
API version: 1.39
Go version: go1.10.8
View gist:3806ca75a5fa66f88409057f0a49dab9
$ dircolors -c | sed -E 's/ow=([[:digit:]]+);([[:digit:]]+)/ow=\1;97/g' | sed 's/env/ -gx/g'
setenv LS_COLORS 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;3
@vaibhav-y
vaibhav-y / formatter.cpp
Last active Jun 27, 2018
Maybe sane string formatting in C++11?
View formatter.cpp
#include <iostream>
#include <string>
#include <sstream>
using StringCIter_t = std::string::const_iterator;
// This is the base case we don't like, how
inline StringCIter_t real_format(const std::string& fmt, std::stringstream& stream)
{
throw std::runtime_error("Too few arguments provided to formatter!");
@vaibhav-y
vaibhav-y / InstaWide.css
Last active Aug 3, 2018
Wide theme for instagram. Uses a majority(60-70%) of the screen space for displaying pictures. Work in progress, struggles a little when width ~ 2*height.
View InstaWide.css
@-moz-document domain("instagram.com") {
/*
* For widening all thumbnails on the profile page.
* - Count per row remains the same,
* - More screen space is utilized with this
* - Also I dont want to click on shit to look at it clearly
* (instagram pre-loads images upto 1080w, so this can be as good as you want it to be)
*/
.v9tJq, /* Profile */
View tail_rec_quicksort.py
def tailRecursiveQuickSort(A, startIdx, endIdx):
while startIdx < endIdx:
pivotIdx = PARTITION(A, startIdx, endIdx)
tailRecursiveQuickSort(A, startIdx, pivotIdx - 1)
startIdx = pivotIdx + 1
@vaibhav-y
vaibhav-y / tasks.json
Created Mar 17, 2017 — forked from felixfbecker/tasks.json
VS Code Javac & JUnit tasks.json
View tasks.json
/*
Example for quick Java compilation and unit tests in VS Code.
Works well with simple BlueJ projects.
Hit Ctrl+Shift+B to compile currently open file with javac.
Hit Ctrl+Shift+T to test currently open test class.
See red wiggles for compilation errors / failed assertions or click exclamation mark in the status bar.
Uses a few workarounds for individual commands per task and filename without extension.
This is written for Windows but it should be easy to adopt for Linux and Mac.
*/
{
@vaibhav-y
vaibhav-y / WhatsAppText2Emoji.js
Last active Jul 31, 2016
A Simple script that converts text smileys to emojis
View WhatsAppText2Emoji.js
// ==UserScript==
// @name WhatsApp Text2Emoji
// @namespace http://tampermonkey.net/
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @version 0.2
// @description Simple script that converts text smileys to emojis
// @author Vaibhav Yenamandra
// @match https://web.whatsapp.com/
// @grant none
View new_seed_bench.rb
require 'benchmark'
require 'pcg_random'
def m
Random.new_seed
end
def n
PCGRandom.new_seed
end
@vaibhav-y
vaibhav-y / run.log
Created Mar 19, 2016
It gets slower after running a few times and starts with comparable perf to Random.new_seed
View run.log
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
128612292610189266596556422956211714817
6.2686e-05
PCGRandom.new_seed
12346887968840078306103323986432
6.4614e-05
dimsum:~/workspace/benchmarks $ ruby new_seed_bench.rb
Random.new_seed
218468435883139448544708591128323365688
@vaibhav-y
vaibhav-y / issue_description_c9
Created Mar 10, 2016
Because c9.io doesnt like if you have 2+ links in a post.
View issue_description_c9
1. When I load c9.io for the first time, no styles are loaded from cdn.c9.io and I get a screen [like this](http://puu.sh/nBEwg/b9cf73fe0e.png).
2. After going to status.c9.io, which needs me to fill out a [captcha](http://puu.sh/nBEGI/92762b043c.jpg). I am able to see my dashboard with proper styling, but is still missing some resources all of which are from cdn.c9.io.
3. [See screenshot of above](http://puu.sh/nBEN9/3b9a868896.png) Note the missing glyphicons in this picture. [And a dropbox link to the console logs](https://www.dropbox.com/s/stn8rl62ndz50v1/c9.io-1457627113298.log?dl=0)
4. Now when I click on "Open" to open my workspace. It gets [stuck loading](http://puu.sh/nBF5n/427dde3458.png). Here's the [dropbox log for that](https://www.dropbox.com/s/jcujwnsvb4uvc9a/ide.c9.io-1457627242366_stuck_Loading.log?dl=0)
You can’t perform that action at this time.