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
// A cute hack demonstrating one (weird?) way of doing optional | |
// parameters in Go. | |
// | |
// Please don't write code like this. It is fun code, though. | |
// | |
// Output: (see it live at golang.org) | |
// | |
// I like cheese. | |
// Do you like cheese too? | |
// I DO! |
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
package main | |
import ( | |
"fmt" | |
) | |
type Person struct { | |
Name string | |
Age int | |
Position string |
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
// X11 viewer for a MJPEG stream, such as the one obtained from the | |
// Android app https://market.android.com/details?id=com.pas.webcam | |
package main | |
import ( | |
"exp/gui/x11" | |
"flag" | |
"http" | |
"image" |
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
// X11 viewer for a MJPEG stream, such as the one obtained from the | |
// Android app https://market.android.com/details?id=com.pas.webcam | |
package main | |
import ( | |
"exp/gui/x11" | |
"flag" | |
"http" | |
"image" |
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
package main | |
import ( | |
"json" | |
"os" | |
"fmt" | |
"log" | |
"strings" | |
) |
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
#!/usr/bin/perl | |
use strict; | |
my $rockettop = <<'END'; | |
. | |
/ \ | |
/ \ | |
END |
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
#!/usr/bin/perl | |
# | |
# Brad's el-ghetto do-our-storage-stacks-lie?-script | |
# | |
sub usage { | |
die <<'END'; | |
Usage: diskchecker.pl -s <server[:port]> verify <file> | |
diskchecker.pl -s <server[:port]> create <file> <size_in_MB> | |
diskchecker.pl -l [port] |
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 "sha1.h" | |
#include <SoftwareSerial.h> | |
SoftwareSerial SerialRNXV(2, 3); | |
int irVal = 0; | |
int distOn = 0; // getting distance | |
const int ms = 1; // unit of milliseconds | |
bool authed = false; |
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
(global-set-key (kbd "M-i") 'goimports) | |
(defun goimports () | |
"Formats the current buffer according to the goimports tool." | |
(interactive) | |
(let ((tmpfile (make-temp-file "goimports" nil ".go")) | |
(patchbuf (get-buffer-create "*Goimports patch*")) | |
(errbuf (get-buffer-create "*Goimports Errors*")) | |
(coding-system-for-read 'utf-8) |
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
package main | |
import ( | |
"bytes" | |
"encoding/xml" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" |
OlderNewer