Skip to content

Instantly share code, notes, and snippets.

View vu3rdd's full-sized avatar

Ramakrishnan Muthukrishnan vu3rdd

View GitHub Profile
@vu3rdd
vu3rdd / motherboards.md
Created May 26, 2015 16:45
motherboards
@vu3rdd
vu3rdd / inferno-osx.txt
Created February 26, 2015 05:50
Building inferno on OSX
[~/src/inferno/vitanuova/inferno]$ hg diff mkfiles/mkfile-MacOSX-386
diff -r 7ab390b860ca mkfiles/mkfile-MacOSX-386
--- a/mkfiles/mkfile-MacOSX-386 Mon Jun 30 14:13:22 2014 +0100
+++ b/mkfiles/mkfile-MacOSX-386 Thu Feb 26 11:19:09 2015 +0530
@@ -9,12 +9,12 @@
ARFLAGS= ruvs
A= a
-AS= gcc -c -arch i386 -m32
+AS= llvm-gcc -c -arch i386 -m32
@vu3rdd
vu3rdd / pi2-shopping-list.md
Last active August 29, 2015 14:15
Raspberry Pi2 shopping list
  1. Pi2 - ✓
  2. case - ✓
  3. usb to serial/gpio - ✓
  4. 5V/2A microusb Power supply.
  5. microSD Card (2GB) - ✓
  6. SD Adaptor - ✓
  7. Touch screen
  8. Battery pack
  9. GSM Module
  10. micro usb cable
@vu3rdd
vu3rdd / majority.hs
Last active August 29, 2015 14:13
Majority element in an array
module Majority where
zeroCrossing :: Eq a => [a] -> [(a, Int)]
zeroCrossing [] = []
zeroCrossing (x:xs) =
scanl f i xs
where f (u, count) v | u /= v && count /= 0 = (u, count - 1)
| u /= v && count == 0 = (v, count + 1)
| otherwise = (u, count + 1)
i = (x, 1)
REM directory to store the build dependencies
mkdir dependencies
REM Download and install Python (2.7.8) x86-64 MSI.
set PATH=%PATH%;c:\Program files (x86)\GnuWin32\bin
wget https://www.python.org/ftp/python/2.7.8/python-2.7.8.msi -O dependencies/python-2.7.8.msi
start /wait dependencies/python-2.7.8.msi /passive
REM Download and install PyOpenSSL
@vu3rdd
vu3rdd / complexity.md
Created October 28, 2014 08:11
Jerome Saltzer's "coping with complexity":

Why aren't abstraction, modularity, hierarchy, and layers enough?

  • First, you must understand what you are doing.
  • It is easy to create abstractions; it is hard to discover the right abstraction.
  • It is hard to change the abstractions later.

(ditto for modularity, hierarchy, and layers)