Skip to content

Instantly share code, notes, and snippets.


Ramkumar Ramachandra artagnon

View GitHub Profile
# 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 / either.hs
Created Apr 9, 2017
Either is not a problem in practice
View either.hs
do res <- try (f a)
case res of
Left (ex :: IOException) -> mapMFirst f as
Right res -> return $ Just res
View .htaccess
Options +FollowSymLinks -MultiViews
DirectorySlash Off
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME}/ -d
RewriteCond %{SCRIPT_FILENAME}.html !-f
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
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 / smart-vs-dumb-pointer.ll
Created Nov 12, 2015
Smart pointer versus dumb pointer (code generation impact)
View smart-vs-dumb-pointer.ll
; ModuleID = 'dumb.cpp'
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.10.0"
; Function Attrs: ssp uwtable
define i32 @main() #0 {
%retval = alloca i32, align 4
%Dumb = alloca i32*, align 8
store i32 0, i32* %retval, align 4
artagnon / git-make.zsh
Last active Dec 25, 2015
My custom build script for linux.git.
View git-make.zsh
# 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
View new-desktop-build.txt
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 / whatchanged-log.diff
Created Aug 7, 2013
The difference between git whatchanged and log
View whatchanged-log.diff
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 / chennai-travel.txt
Created Aug 1, 2013
What to do in Chennai
View chennai-travel.txt
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
artagnon / Makefile
Last active Dec 20, 2015
textadept Makefile
View Makefile
# Copyright 2007-2013 Mitchell See LICENSE.
kernel = $(shell uname -s)
ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
ifeq (win, $(findstring win, $(MAKECMDGOALS)))
# Cross-compile for Win32.
ifeq (win32, $(findstring win32, $(MAKECMDGOALS)))
arch = win32
CROSS = i686-w64-mingw32-
lua_dll = luajit/src/lua51.dll