Skip to content

Instantly share code, notes, and snippets.

View artagnon's full-sized avatar

Ramkumar Ramachandra artagnon

View GitHub Profile
@artagnon
artagnon / gmail-filters.txt
Created March 23, 2013 06:40
GMail filters for high-volume lists
# I use two rules for the git list. Note: don't use "from:me", because that matches email addresses with a "me" in them.
Match: (from:artagnon@gmail.com, to:git@vger.kernel.org OR cc:git@vger.kernel.org)
Do: Apply label "git"
Match: list:"<git.vger.kernel.org>" -{to:artagnon@gmail.com, cc:artagnon@gmail.com, from:artagnon@gmail.com}
Do: Skip Inbox, Apply label "git"
@artagnon
artagnon / youtube-dl.py
Created September 30, 2009 04:44
youtube-dl.py
#!/usr/bin/env python
#
# Copyright (c) 2006-2008 Ricardo Garcia Gonzalez
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
@artagnon
artagnon / either.hs
Created April 9, 2017 00:02
Either is not a problem in practice
do res <- try (f a)
case res of
Left (ex :: IOException) -> mapMFirst f as
Right res -> return $ Just res
Options +FollowSymLinks -MultiViews
DirectorySlash Off
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME}/ -d
RewriteCond %{SCRIPT_FILENAME}.html !-f
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
from __future__ import print_function
__copyright__ = """
Copyright (C) 2016 The MathWorks, Inc.
Copyright (C) 2011-15 Andreas Kloeckner
"""
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@artagnon
artagnon / git-make.zsh
Last active December 25, 2015 11:58
My custom build script for linux.git.
# usage: git-make ;for x86 linux.git build or make -j 8
# or: git-make prove ;for git.git tests
# or: git-make um ;for um linux.git build
# or: git-make um32 ;for um32 linux.git build
# or: git-make arm ;for arm64 linux.git build
function git-make () {
unset ARCH
unset SUBARCH
unset CROSS_COMPILE
@artagnon
artagnon / new-desktop-build.txt
Created August 9, 2013 11:00
My new desktop
Gigabyte DDR3 1600 LGA 1150 Intel B85 mATX Motherboard GA-B85M-HD3
INR 4,575.11
Kingston Digital 120GB SSDNow V300 SATA 3 2.5 (7mm height) with Adapter Solid State Drive 2.5-Inch SV300S37A/120G
INR 6,411.19
Intel Core i7-4770 Quad-Core Desktop Processor 3.4 GHZ LGA 1150 8 MB Cache BX80646I74770
INR 18,944.56
DVI Gear HDMI Cable 2M 6 feet
@artagnon
artagnon / whatchanged-log.diff
Created August 7, 2013 15:55
The difference between git whatchanged and log
diff --git a/whatchanged b/log
index fa1b223..004d9aa 100644
--- a/tmp/whatchanged
+++ b/tmp/log
@@ -1,4 +1,4 @@
-int cmd_whatchanged(int argc, const char **argv, const char *prefix)
+int cmd_log(int argc, const char **argv, const char *prefix)
{
struct rev_info rev;
struct setup_revision_opt opt;
@artagnon
artagnon / chennai-travel.txt
Created August 1, 2013 09:38
What to do in Chennai
I'll exclude what you can find easily on Wikitravel:
- The city organizes carnatic music concerts every now and then called
"kutcheris". Ask a friend interested in music to take you to one.
- It's less cosmopolitan than consumerist than many other cities
(eg. Bangalore); very few avenues for spending. Avoid the big chains
(Cafe Coffee Day, Kentucky Fried Chicken, Dominos Pizza etc): you'll
have plenty of time to check them out in other Indian cities. The
big weekend activity for a family is going out for dinner: so, check