Skip to content

Instantly share code, notes, and snippets.

View Hammer.md
@vu3rdd
vu3rdd / inferno-osx.txt
Created Feb 26, 2015
Building inferno on OSX
View inferno-osx.txt
[~/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 Aug 29, 2015
Raspberry Pi2 shopping list
View pi2-shopping-list.md
  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 Aug 29, 2015
Majority element in an array
View majority.hs
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)
View tahoe.bat
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 Oct 28, 2014
Jerome Saltzer's "coping with complexity":
View complexity.md

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)