Skip to content

Instantly share code, notes, and snippets.

@kestred
kestred / astron.astyle
Last active December 23, 2015 13:39
astron.astyle :: astyle options for astron
# Indentation
indent=tab=4
indent-classes
indent-switches
indent-preprocessor # Requires 'convert-tabs'
convert-tabs
# Spacing
pad-oper # Adds spaces to operators
unpad-paren # Remove spaces surround parens
@kestred
kestred / astron-home.html
Created October 18, 2013 22:42
Astron website prototype idea
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Astron - Distributed Server Suite</title>
<meta name="description"
content="Astron is an open-source, distributed server suite particularily well-suited for
powering MMO games. The server runs as a network of daemon processes, each containing
one or more roles. Each role handles a specific set of tasks required by the application
to distribut the workload of managing a multi-sharded application or game with many
@kestred
kestred / c++-decorators.cpp
Created November 10, 2013 01:52
Attempting to implement python-style decorators in C++. Not sure I like it write now.
#include <iostream>
#include <functional>
#include <unordered_map>
#include <string>
using std::placeholders::_1;
#define DCLASS(name) \
typedef std::function<void(name&)> atomic_t; \
std::unordered_map<std::string, atomic_t> m_atomics;
@kestred
kestred / c++-simpler-decorators.cpp
Created November 10, 2013 02:09
Attempt two at coming up with decorators
#include <iostream>
#include <unordered_map>
#include <string>
#define DCLASS(cpp_class) \
public std::unordered_map<std::string, void (cpp_class::*)(int)> s_atomics;
// note, "int" would actually be a datagram iterator
#define ATOMIC(field_name, cpp_class, cpp_fn) \
cpp_class.s_atomics[field_name] = cpp_fn;
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: DC File
scopeName: source.dcfile
fileTypes: [dc, dcf]
uuid: 43bb3bb2-4a23-4b91-9e46-c934cb20ed60
foldingStartMarker: \{
foldingStopMarker: \{
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>dc</string>
<string>dcf</string>
</array>
<key>foldingStartMarker</key>
" Vim syntax file
" Language: DC File
" Maintainer: Kevin Stenerson
" Latest Revision: 12 February 2014
if exists("b:current_syntax")
finish
endif
#include <set>
#include <boost/icl/interval_map.hpp>
typedef std::set<char> set_t;
typedef boost::icl::interval_map<unsigned long long, set_t> imap_t;
typedef boost::icl::discrete_interval<unsigned long long> interval_t;
imap_t testmap = imap_t();
interval_t intervalA = interval_t::closed(3043, 3475);
interval_t intervalB = interval_t::closed(1000, 5000);
@kestred
kestred / Monokai Sharp
Created November 13, 2014 08:59
A variation on the Monokai TextMate theme with more prominent comments and other colors slightly muted. Helpful to deter over-commenting and draw your attention to comments that actually matter!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Monokai Kestred</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>

Keybase proof

I hereby claim:

  • I am kestred on github.
  • I am kestred (https://keybase.io/kestred) on keybase.
  • I have a public key whose fingerprint is 0013 229F C2D4 2C50 E73F 0320 F188 D779 DBE0 F767

To claim this, I am signing this object: