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
Note shell prompt appended to long last line | |
mk270@cornford ~/Src/iati-test> ocamlbuild src/driver.byte | |
Finished, 0 targets (0 cached) in 00:00:00. | |
Finished, 17 targets (17 cached) in 00:00:00. | |
W: Cannot get variable ext_objW: Cannot get variable ext_libW: Cannot get variable ext_dllW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindmk270@cornford ~/Src/iati-test> |
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
mk270@cornford ~/Prog/rust/web1> rm -rf target; cargo clean; rm -f Cargo.lock; cargo build | |
Updating git repository `https://github.com/iron/cookie.git` | |
Updating git repository `https://github.com/DaGenix/rust-crypto.git` | |
Updating git repository `https://github.com/iron/iron.git` | |
Updating git repository `https://github.com/servo/rust-url.git` | |
Updating git repository `https://github.com/lifthrasiir/rust-encoding` | |
Updating git repository `https://github.com/chris-morgan/rust-http.git` | |
Updating git repository `https://github.com/sfackler/rust-openssl.git` | |
Updating git repository `https://github.com/chris-morgan/anymap.git` | |
Updating git repository `https://github.com/reem/rust-http-content-type.git` |
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
-module(ws_handler). | |
-behaviour(cowboy_websocket_handler). | |
-export([init/3]). | |
-export([websocket_init/3]). | |
-export([websocket_handle/3]). | |
-export([websocket_info/3]). | |
-export([websocket_terminate/3]). | |
init({tcp, http}, _Req, _Opts) -> |
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
%% Feel free to use, reuse and abuse the code in this file. | |
%% @private | |
-module(websocket_app). | |
-behaviour(application). | |
%% API. | |
-export([start/2]). | |
-export([stop/1]). |
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
mk270@cornford ~/Src/word_generator> cargo build | |
Updating git repository `https://github.com/rust-lang/rand.git` | |
Downloading unicode-segmentation v0.1.0 | |
Downloading regex v0.1.30 | |
Compiling rustc-serialize v0.3.14 | |
Compiling regex v0.1.30 | |
Compiling libc v0.1.6 | |
Compiling unicode-segmentation v0.1.0 | |
Compiling rand v0.3.8 (https://github.com/rust-lang/rand.git#93544850) | |
Compiling word_generator v0.1.0 (file:///home/mk270/Src/word_generator) |
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 <stdint.h> | |
#include <string.h> | |
int main(int argc, char *argv[], char *env[]) { | |
char *arena; | |
char hex[100]; | |
char *target; |
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
tax_payable = (band_info, gross) -> | |
tax_in_band = (band) -> | |
band.rate * (Math.min(band.max, gross) - Math.min(band.min, gross)) | |
total = 0 | |
bands = for band in band_info | |
prev_total = total | |
total += band.width + 0 | |
{ width: band.width, rate: band.rate, min: prev_total, max: total } |
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 <unistd.h> | |
#include <stdlib.h> | |
#define MAX 4096 | |
void die(const char *s) { | |
perror(s); | |
exit(1); | |
} |
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
type branch = | |
| Legislative | |
| Executive | |
| Judicial | |
| Other | |
type origin = | |
| Elected | |
| Appointed |
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/ruby | |
require 'dbi' | |
db_name = 'db_test' | |
db_user = 'username' | |
db_pass = 'pass1234' | |
db_host = '127.0.0.1' | |
exit_status = nil |
OlderNewer