Skip to content

Instantly share code, notes, and snippets.

View bhavyanshu's full-sized avatar

Bhavyanshu Parasher bhavyanshu

View GitHub Profile
@bhavyanshu
bhavyanshu / wp-docker-compose
Created April 13, 2018 17:05
wp-docker-compose
version: '3.1'
services:
wordpress:
image: wordpress
ports:
- 8888:80
environment:
WORDPRESS_DB_PASSWORD: example
#!/usr/bin/python
import httplib
import json
import csv
import os
import sys
import time
import urllib
import datetime
#!/usr/bin/python
import httplib
import json
import csv
import os
import sys
import time
import urllib
import datetime
@bhavyanshu
bhavyanshu / fixliquid.js
Last active December 27, 2015 09:23
A method to render liquid tags inside code blocks which get stripped off by markdown [Tested on pygments with jekyll]
// The method is explained here -> https://alexpearce.me/2012/04/escaping-liquid-tags-in-jekyll/
// Replaces <% %> with {% %}
// Replaces <%= %> with {{ }}
(function(window, document, undefined) {
var replaceERBTags = function(elements) {
elements.each(function() {
var $this = $(this),
txt = $this.html();
// Replace <%= %> with {{ }}
txt = txt.replace(new RegExp('&lt;%=(.+?)%&gt;', 'g'), '{{$1}}');
@bhavyanshu
bhavyanshu / keybase.md
Created December 29, 2014 17:20
Keybase.io

Keybase proof

I hereby claim:

  • I am bhavyanshu on github.
  • I am bhavyanshu (https://keybase.io/bhavyanshu) on keybase.
  • I have a public key whose fingerprint is 9423 DBCF 9BB3 B144 F1EB AE16 CD19 67F4 FDF1 A9AB

To claim this, I am signing this object:

#!/bin/bash
# This script will benchmark one or many webservers and plot the results into an image.
total=1000
concurrent=10
#################################################################################
echo "Type the adresses of the webserver separated by comma followed by [ENTER]:"
@bhavyanshu
bhavyanshu / vga.sh
Last active December 19, 2015 12:19
gtf 1024 768 60
xrandr --newmode "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
xrandr --addmode VGA1 1024x768_60.00
xrandr --output VGA1 --mode 1024x768_60.00