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 <iostream> | |
#include <decimal/decimal> | |
using std::cout; | |
using std::endl; | |
template<typename T> | |
void print(T d) | |
{ | |
cout << std::decimal::decimal_to_double(d) << endl; |
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 python | |
import os | |
import sys | |
import argparse | |
try: | |
from boto.ec2.connection import EC2Connection | |
except ImportError: | |
sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n') | |
sys.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
# Please see the script's new home: https://github.com/alphapapa/magit.sh |
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
# directory where cygwin will be installed | |
$cygwinroot="C:\cygwin64" | |
# choose URL from https://cygwin.com/mirrors.html | |
$mirror="http://mirrors.kernel.org/sourceware/cygwin/" | |
# packages to be installed on top of the base. Comma-separated, no spaces | |
$packages="gcc-core,make,openssl,openssl-devel,zlib-devel,curl,bc" | |
# version of tarsnap to install | |
$tarsnapdist=(Invoke-WebRequest -uri https://www.tarsnap.com/download/ -UseBasicParsing).Content -split "`n" | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
all:consumer producer | |
CPPFLAGS+=-std=c++03 -Wall -pedantic | |
CPPFLAGS+=-g -O0 | |
CPPFLAGS+=-isystem ~/custom/boost/ | |
LDFLAGS+=-L ~/custom/boost/stage/lib/ -Wl,-rpath,/home/sehe/custom/boost/stage/lib | |
LDFLAGS+=-lboost_system -lrt -lpthread | |
%:%.cpp |
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
;; Display all the monospace fonts available to Emacs in a dedicated buffer | |
(defun font-is-mono-p (font-family) | |
;; with-selected-window | |
(let ((wind (selected-window)) | |
m-width l-width) | |
(with-temp-buffer | |
(set-window-buffer (selected-window) (current-buffer)) | |
(text-scale-set 4) | |
(insert (propertize "l l l l l" 'face `((:family ,font-family)))) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/* | |
g++ main.cpp -lboost_system -lboost_thread -lpthread -o main | |
*/ | |
#include <boost/asio.hpp> | |
#include <boost/array.hpp> | |
#include <iostream> | |
void send_something(std::string host, int port, std::string message) |
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
socat - udp4-listen:8125,fork | tee >(socat - udp-sendto:127.0.0.1:8135) >(socat - udp-sendto:127.0.0.1:8140) |
OlderNewer