This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rc | |
. 9.rc | |
exec sed 's/^ //' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rc | |
. 9.rc | |
exec awk '{print " " $0}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rc | |
fn f { | |
n=$1 | |
if(! cat $f | cut -c1-$n | 9 grep -v '^[ ]+$' >/dev/null){ | |
x=`{f `{expr $n + 1}} | |
echo '.'$"x | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<u.h> | |
#include<libc.h> | |
#include<json.h> | |
#include<bio.h> | |
#include<String.h> | |
const char url[] = "http://www.reddit.com/.json?feed=ffffffffffffffffffffffffffffffffffffffff&user=jbedo"; | |
/* Does the webfs query */ | |
String * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/rc | |
urlfrom='http://www.transilien.mobi/TempReelSaisieSubmit.do?debutDepart=chatelet&debutArrivee=evry+courcouronnes' | |
urlto='http://www.transilien.mobi/TempReelSaisieSubmit.do?debutDepart=evry+courcouronnes&debutArrivee=chatelet' | |
url=$urlfrom | |
for(i) switch $i { | |
case -t | |
url=$urlto | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<u.h> | |
#include<libc.h> | |
#define MIN /60.0 | |
#define DEG * 2 * PI / 360.0 | |
#define RAD * 360.0 / (2 * PI) | |
double longitude = 2.0 + 20.0 MIN; | |
const double Eccentricity = 0.0167; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<u.h> | |
#include<libc.h> | |
#define MAX(a, b) ((a) > (b) ? (a) : (b)) | |
/* Hilbert curve functions (from Wikipedia) */ | |
/* rotate/flip a quadrant appropriately */ | |
void rot(int n, int *x, int *y, int rx, int ry) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<unistd.h> | |
#include<math.h> | |
#include<string.h> | |
#include<limits.h> | |
#define NADAPTERS 4 | |
static const int MAXCLOCK = 950; | |
static const int MINCLOCK = 500; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur old/mkfile new/mkfile | |
--- old/mkfile Mon Feb 11 04:27:13 2008 | |
+++ new/mkfile Sat Mar 19 16:34:15 2011 | |
@@ -1,6 +1,4 @@ | |
-<$PLAN9/src/mkhdr | |
- | |
-MKSHELL=rc | |
+</$objtype/mkfile | |
CFLAGS=$CFLAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <u.h> | |
#include <libc.h> | |
#include <draw.h> | |
#include <memdraw.h> | |
static double Ptop = 0.995; | |
static double Pbot = 0.01; | |
typedef struct range range; | |
struct range{ |