Skip to content

Instantly share code, notes, and snippets.

amrav / cache-traffic.ipynb
Created December 1, 2017 16:57
Cache refresh traffic estimation using a k-sided die
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
amrav / LocalSettings.php
Created June 20, 2017 01:56
Slack integration using Redis
# Slack integration
require_once "$IP/extensions/Slack/Slack.php";
# Slack extension configuration options
$wgSlackWebhookURL = ""
$wgSlackUserName = "batman";
$wgSlackChannel = "#recent-changes";
$wgSlackIconURL = "";
$wgSlackLinkUsers = true;
amrav /
Last active September 25, 2016 23:16

Keybase proof

I hereby claim:

  • I am amrav on github.
  • I am amrav ( on keybase.
  • I have a public key whose fingerprint is 7C19 F228 706B 25A2 E5B2 CA52 796A 12B5 B323 D584

To claim this, I am signing this object:

amrav / Zen of Metakgp
Created April 5, 2016 12:04
Zen of Metakgp
Together is better than alone
But beware, for groups cannot be blamed
Consensus trumps authority
And should be won by argument
Surround yourself with your betters
And strive to best them
Ignore what is commonly accepted
Change is wrought through defiant perfection
But shipping beats perfection, every time
#include <stdio.h>
#include <stdlib.h>
#define BOARD_SIZE 8
void print_rows(int row[], int len) {
int i;
for (i = 0; i < len; ++i) {
printf("%d ", row[i]);
amrav / -
Last active December 27, 2015 10:19
Sat Apr 12 21:04:13 IST 2014\n144.16.192.217 8080 8080 8080
amrav / proxy.zsh
Created September 25, 2013 12:23
Utilities for KGP's proxy
#! /usr/bin/zsh
function change_proxy() {
case $1 in
unset http_proxy && unset https_proxy && \
unset HTTP_PROXY && unset HTTPS_PROXY && export socks_proxy=''
unset socks_proxy && export http_proxy='' && \
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="">
<script src="" charset="utf-8"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
<div style="max-width:900px; -webkit-transform:rotate(0deg)">
<scene id="scene1">
<label t="translate(0,346)">