Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css">
<script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
<body>
<div style="max-width:900px; -webkit-transform:rotate(0deg)">
<scene id="scene1">
<label t="translate(0,346)">
@amrav
amrav / proxy.zsh
Created September 25, 2013 12:23
Utilities for KGP's proxy
#! /usr/bin/zsh
function change_proxy() {
case $1 in
'tor')
unset http_proxy && unset https_proxy && \
unset HTTP_PROXY && unset HTTPS_PROXY && export socks_proxy='127.0.0.1:49705'
;;
'apple')
unset socks_proxy && export http_proxy='http://10.3.100.211:8080/' && \
@amrav
amrav / -
Last active December 27, 2015 10:19
Sat Apr 12 21:04:13 IST 2014\n144.16.192.217 8080 144.16.192.247 8080 144.16.192.213 8080
foobar
#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]);
}
printf("\n");
@amrav
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
@amrav
amrav / keybase.md
Last active September 25, 2016 23:16

Keybase proof

I hereby claim:

  • I am amrav on github.
  • I am amrav (https://keybase.io/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
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 = "https://hooks.slack.com/services/some-webhook-url"
$wgSlackUserName = "batman";
$wgSlackChannel = "#recent-changes";
$wgSlackIconURL = "http://i.picresize.com/images/2015/09/20/tdpsU.jpg";
$wgSlackLinkUsers = true;
@amrav
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.