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
signed long my_signed_htonl(signed long value) | |
{ | |
unsigned long l = *reinterpret_cast<unsigned long *>(&value); | |
l = htonl(l); | |
return *reinterpret_cast<signed long *>(&l); | |
} | |
signed long my_signed_ntohl(signed long value) | |
{ | |
unsigned long l = *reinterpret_cast<unsigned long *>(&value); |
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
" .vimrc | |
set nocompatible | |
set showcmd | |
set incsearch | |
set hlsearch | |
set novisualbell | |
set t_vb= | |
set mouse=a | |
set mousemodel=popup | |
set mousehide |
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 sh | |
lastversion=`git tag -l | egrep "^v[0-9]+\.[0-9]+\.[0-9]+" | cut -d"-" -f 1 | sed "s/^v//g" | sort | tail -n 1` | |
if [ -e $lastversion ] | |
then | |
lastversion="0.0.0" | |
else | |
tmpmajor=`git tag -l | egrep "^v[0-9]+\.[0-9]+\.[0-9]+" | sed "s/^v//g" | cut -d"." -f1 | sort -n | tail -n 1` | |
tmpminor=`git tag -l | egrep "^v$tmpmajor\.[0-9]+\.[0-9]+" | sed "s/^v//g" | cut -d"." -f2 | sort -n | tail -n 1` | |
tmpbuild=`git tag -l | egrep "^v$tmpmajor\.$tmpminor\.[0-9]+" | sed "s/^v//g" | cut -d"." -f3 | sort -n | tail -n 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
#!/usr/bin/env sh | |
GG_ROOT=$PWD | |
GGDEB_ROOT=$PWD/build/deb | |
GGDEB_DEBIAN=$GGDEB_ROOT/DEBIAN | |
GGDEB_CONTROL=$GGDEB_DEBIAN/control | |
GGDEB_CONFFILES=$GGDEB_DEBIAN/conffiles | |
GGDEB_SERVER=$GGDEB_ROOT/opt/server | |
GGDEB_ETC=$GGDEB_ROOT/etc/seduction |
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 sh | |
GG_ROOT=$PWD/info | |
GGDEB_ROOT=$PWD/deb | |
GGDEB_DEBIAN=$GGDEB_ROOT/DEBIAN | |
GGDEB_CONTROL=$GGDEB_DEBIAN/control | |
GGDEB_SERVER=$GGDEB_ROOT/opt/infoportal | |
GGDEB_ETC=$GGDEB_ROOT/etc/seduction | |
if [ -e $GGDEB_OUT ]; then |
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: Optimized to be fast at simple value indexing. | |
-- Slower on initialization and on table value fetching. | |
-- WARNING: This does not protect userdata. | |
treadonly = nil | |
do | |
local newindex = function() | |
error("attempted to change read-only table") | |
end | |
treadonly = function(value, with_tostring, callbacks, disable_nil) |
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> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <iostream> | |
#include <vector> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
int main(int argc, char** argv) |
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
(defun encode(input) | |
(defun enc(out cur cnt inp) | |
(defun flush() (cons cnt (cons cur out))) | |
(cond | |
((null inp) (if (null cur) out (flush))) | |
((null cur) (enc out (car inp) 1 (cdr inp))) | |
((eq cur (car inp)) (enc out cur (+ cnt 1) (cdr inp))) | |
(t (enc (flush) (car inp) 1 (cdr inp))))) | |
(nreverse (enc '() '() '() input))) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer