Skip to content

Instantly share code, notes, and snippets.

View prayagverma's full-sized avatar
:bowtie:
Infected by an idea

Prayag Verma prayagverma

:bowtie:
Infected by an idea
View GitHub Profile
@benshimmin
benshimmin / gist:8da42a687eae6e47f30d
Last active August 29, 2015 14:09
"Look at love" - Rumi
look at love
how it tangles
with the one fallen in love
look at spirit
how it fuses with earth
giving it new life
why are you so busy
with this or that or good or bad
@muratcorlu
muratcorlu / grunt-connect-rewrite.js
Last active May 14, 2016 01:29
Simple connect middleware for simulating url-rewriting for grunt connect servers.
var fs = require('fs'),
url = require('url');
module.exports = function (rootDir, indexFile) {
indexFile = indexFile || "index.html";
return function(req, res, next){
var path = url.parse(req.url).pathname;
fs.readFile('./' + rootDir + path, function(err, buf){
@jintoppy
jintoppy / GlobalAjaxInterceptor
Last active September 13, 2016 12:40
A global ajax interceptor for Angular application, where it cancels all the previous state's ajax + http requests on state change. I am cancelling ajax requests also because some applications might still have some jquery utilities which does ajax requests.
angular.module('globalmodule')
.config(['$provide', '$httpProvider', function($provide, $httpProvider){
$provide.factory('GlobalAjaxInterceptor', ['$q', '$rootScope', function($q, $rootScope){
var currentRequests={http: {}, ajax: {}};
function addHttpRequest(conf){
currentRequests.http[conf.url] = conf.promiseObj;
}
@AvinashKrSharma
AvinashKrSharma / vimrc for how to get started with vim
Last active July 13, 2017 13:06
Initial vimrc helpful to get started with vim
" This will install Vundle
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle.."
echo ""
silent !mkdir -p ~/.vim/bundle
silent !git clone https://github.com/VundleVim/Vundle.vim ~/.vim/bundle/vundle
let iCanHazVundle=0
@taylor224
taylor224 / README.md
Last active July 5, 2018 12:32
MariaDB Auto Backup Script

MariaDB Auto Backup Script

without DB lock

@glueckpress
glueckpress / wp-rocket-example-deactivate-for-amp.php
Last active March 5, 2019 21:15
[WordPress][WP Rocket]Disable all WP Rocket functions on AMP pages created by the Automattic AMP plugin.
<?php
/**
* UNTESTED EXAMPLE!
* Please don’t use in production without having tested it before!
* @link http://wordpress.stackexchange.com/a/12165
* @return void
*/
function example__disable_rocket_cache_for_amp_pages() {
if ( ! defined( 'AMP_QUERY_VAR' ) )
return;
@zmaril
zmaril / softwarehelpskill.md
Last active August 3, 2021 04:52
I want to write software that helps kill people.

I want to write software that helps kill people.

Please, before you call the police and get my github account put on lockdown, allow me a moment to explain. What I really want to do is work on projects that advance the human condition and improve people's lives. I've been in a mad dash to learn how to program for the past four or five years exactly because I realized how much good I could do for the world with a computer.

@aeron7
aeron7 / style.css
Last active January 24, 2022 07:41
Zerodha Kite Dark Mode
div.page-content.positions {
background-color: #000000;
color: #ffffff;
}
h3.page-title.small {
color: #ffffff;
}
span.text-label.small.aqua.indigo {
<?php
/**
* Plugin Name: NGINX FastCGI cache purge
* Version: 0.1
* Description: Flush NGINX FastCGI cache purge
* Author: The Shipyard Crew
* Author URI: https://theshipyard.se/
* Plugin URI: https://theshipyard.se/
* Text Domain: nginx-fastcgi-cache-purge
@marick
marick / about_those_lava_lamps.md
Last active June 22, 2022 21:08
About Those Lava Lamps

Around 2006-2007, it was a bit of a fashion to hook lava lamps up to the build server. Normally, the green lava lamp would be on, but if the build failed, it would turn off and the red lava lamp would turn on.

By coincidence, I've actually met, about that time, (probably) the first person to hook up a lava lamp to a build server. It was Alberto Savoia, who'd founded a testing tools company (that did some very interesting things around generative testing that have basically never been noticed). Alberto had noticed that people did not react with any urgency when the build broke. They'd check in broken code and go off to something else, only reacting to the breakage they'd caused when some other programmer pulled the change and had problems.