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/zsh | |
emulate -L zsh | |
setopt err_exit warn_create_global no_unset | |
#setopt xtrace | |
#typeset -i UL_MAX=215040 | |
#typeset -i UL_MAX=20480 # kbit/s | |
#typeset -i UL_MAX=16384 # kbit/s | |
typeset -i UL_MAX=17408 # kbit/s | |
#typeset -i UL_MAX=1800 |
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 <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
int main() { | |
unsigned char foo_arr[9]; | |
memset(foo_arr, 0, 9); | |
unsigned char *foo = foo_arr; | |
uint8_t a = 0xDE; | |
uint64_t b = 0xDEEFBEADDEEFBEADLL; |
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 <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
int main() { | |
unsigned char foo_arr[9]; | |
memset(foo_arr, 0, 9); | |
unsigned char *foo = foo_arr; | |
uint8_t a = 0xDE; | |
uint64_t b = 0xDEEFBEADDEEFBEADLL; |
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
(* langfc-src/scanner-parser/langf-hand-scanner.sml | |
* | |
* COPYRIGHT (c) 2011-2013 Matthew Fluet (http://www.cs.rit.edu/~mtf) | |
* All rights reserved. | |
* | |
* Rochester Institute of Technology | |
* 4005-711 | |
* Q20112,Q20122 | |
* | |
* COPYRIGHT (c) 2009 Matthew Fluet (http://tti-c.org/fluet) |
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 <string.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
class string { | |
public: | |
string( const char *str ) : m_str(strdup(str)) {} | |
string( int i ) { | |
asprintf(&m_str, "%d", i); |
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 ruby | |
require 'getoptlong' | |
include Process | |
include Signal | |
$ignored_signals = ["CLD"] | |
def usage(strm) | |
strm.puts <<-EOF |
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/zsh | |
emulate -L zsh | |
setopt err_exit warn_create_global no_unset | |
#setopt xtrace | |
function parse_elem { | |
local obj cur="$1" in_recovery="$2" | |
if [[ -z "$cur" ]]; then | |
read -r cur || return 1 | |
ret_delim=$'\n' |
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 <setjmp.h> | |
#include <stddef.h> | |
#include <string.h> | |
#define NORETURN __attribute__((noreturn)) | |
typedef void (*AllocCont)( void * ); | |
void NORETURN longjmp_on_return( AllocCont f, jmp_buf env, void *mem ) { |
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
Mysql2::Error - MySQL server has gone away: | |
/var/www/pub/photohunt/.bundle/ruby/1.9.1/gems/sequel-3.33.0/lib/sequel/database/logging.rb:53:in `query' | |
/var/www/pub/photohunt/.bundle/ruby/1.9.1/gems/sequel-3.33.0/lib/sequel/database/logging.rb:53:in `block in log_connection_execute' | |
/var/www/pub/photohunt/.bundle/ruby/1.9.1/gems/sequel-3.33.0/lib/sequel/database/logging.rb:28:in `log_yield' | |
/var/www/pub/photohunt/.bundle/ruby/1.9.1/gems/sequel-3.33.0/lib/sequel/database/logging.rb:53:in `log_connection_execute' | |
/var/www/pub/photohunt/.bundle/ruby/1.9.1/gems/sequel-3.33.0/lib/sequel/database/query.rb:509:in `rollback_transaction' | |
/var/www/pub/photohunt/.bundle/ruby/1.9.1/gems/sequel-3.33.0/lib/sequel/adapters/shared/mysql.rb:318:in `rollback_transaction' | |
/var/www/pub/photohunt/.bundle/ruby/1.9.1/gems/sequel-3.33.0/lib/sequel/database/query.rb:271:in `rescue in _transaction' | |
/var/www/pub/photohunt/.bundle/ruby/1.9.1/gems/sequel-3.33.0/lib/sequel/data |
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
Semi-formally, the JSON communicated will follow the following EBNF | |
(https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) grammar (note | |
that this is only roughly EBNF): | |
(* Valid error codes *) | |
ERR_SUCCESS = 0 (* No error occurred *) | |
ERR_UNSPEC = 1 (* Unspecified error. Message contains additional information *) | |
ERR_NOTAUTH = 2 (* Authorization token invalid *) | |
ERR_GAMEOVER = 3 (* Photohunt competition is over. No judged submissions allowed *) | |
(* Additional error codes will be added during development *) |