This file contains hidden or 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
| local_events() { | |
| cat << '!' | |
| Keygroup Multimedia | |
| Key XF86AudioMute | |
| amixer sset Master toggle | |
| Key XF86AudioLowerVolume | |
| amixer sset Master 2- | |
| Key XF86AudioRaiseVolume | |
| amixer sset Master 2+ |
This file contains hidden or 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
| status() { | |
| echo -n $(cat /sys/devices/platform/smapi/BAT0/state) $(cat /sys/devices/platform/smapi/BAT0/remaining_percent) '|' $(uptime | sed 's/.*://; s/,//g') '|' $(date) | |
| } |
This file contains hidden or 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
| urldecode(){ | |
| echo -e "$(sed 's/+/ /g; s/%/\\x/g')" | |
| } |
This file contains hidden or 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
| #!/opt/plan9/bin/rc | |
| . 9.rc | |
| path = ($PLAN9/bin/venti $path) | |
| arenasize = $1 | |
| isectsize = `{echo 'int('^$arenasize^'*0.05)' | hoc} | |
| bloomsize = 512 | |
| touch venti.conf |
This file contains hidden or 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
| align2 <- function(x, y) | |
| { | |
| # FFT | |
| pad <- rep(0, length(x)) | |
| xp <- c(pad, x, pad) | |
| yp <- c(pad, y, pad) | |
| fx <- fft(xp) | |
| fy <- fft(yp) | |
| # Correlation |
This file contains hidden or 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 CHILD(x) ((x) * 2 + 1) | |
| enum{ | |
| Nsuits = 4, | |
| Ncards = 13, | |
| Ntot = Nsuits * Ncards, | |
| Nplayers = 4 |
This file contains hidden or 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{ |
This file contains hidden or 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 hidden or 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; |
OlderNewer