Skip to content

Instantly share code, notes, and snippets.

View astocko's full-sized avatar
💭
I may be slow to respond.

Alexander Stocko astocko

💭
I may be slow to respond.
View GitHub Profile
@astocko
astocko / c99.l
Created May 6, 2017 20:07 — forked from codebrainz/c99.l
C99 Lex/Flex & YACC/Bison Grammars
D [0-9]
L [a-zA-Z_]
H [a-fA-F0-9]
E ([Ee][+-]?{D}+)
P ([Pp][+-]?{D}+)
FS (f|F|l|L)
IS ((u|U)|(u|U)?(l|L|ll|LL)|(l|L|ll|LL)(u|U))
%{
#include <stdio.h>
@astocko
astocko / test_extctxt.rs
Created January 28, 2017 01:48 — forked from kevinmehall/test_extctxt.rs
Rust: Creating a ExtCtxt for quasiquote outside of a syntax extension
#![feature(quote)]
extern crate syntax;
use syntax::print::pprust;
use syntax::codemap::DUMMY_SP;
fn main() {
with_fake_extctxt(|cx| {
let x = quote_expr!(cx, (a+b));
@astocko
astocko / BUILD
Created November 8, 2016 17:48 — forked from bsilver8192/BUILD
Basics of generating a compile_commands.json file with Bazel
py_binary(
name = 'generate_compile_command',
srcs = [
'generate_compile_command.py',
],
deps = [
'//third_party/bazel:extra_actions_proto_py',
],
)
@astocko
astocko / .tmux.conf
Created October 9, 2016 20:03 — forked from jnaulty/.tmux.conf
The best tmux and vim configuration in the universe
# Our .tmux.conf file
# Setting the prefix from C-b to C-s
set -g prefix C-s
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -sg escape-time 1
# Ensure that we can send Ctrl-S to other apps
bind C-s send-prefix
(defn code-mirror
"Create a code-mirror editor. The parameters:
value-atom (reagent atom)
when this changes, the editor will update to reflect it.
options
:style (reagent style map)
will be applied to the container element
:js-cm-opts
options passed into the CodeMirror constructor
:on-cm-init (fn [cm] -> nil)
@astocko
astocko / bad-words
Created June 15, 2016 14:26 — forked from fjfish/bad-words
Plain text file of regexps to match "bad" words, e.g. using grep -fi bad-words *.txt
[^[:alnum:]]ahole[^[:alnum:]]
[^[:alnum:]]anus[^[:alnum:]]
[^[:alnum:]]ash[0o]le[^[:alnum:]]
[^[:alnum:]]ass[^[:alnum:]]
[^[:alnum:]]azz[^[:alnum:]]
[^[:alnum:]]bassterd[^[:alnum:]]
[^[:alnum:]]bast[ae]+rd[^[:alnum:]]
[^[:alnum:]]b[i1]+[a]*tch[^[:alnum:]]
[^[:alnum:]]bl[o0]+wj[o0]+b[^[:alnum:]]
[^[:alnum:]]boffing[^[:alnum:]]
@astocko
astocko / tmux.md
Created June 9, 2016 14:19 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@astocko
astocko / PerformanceRelated.txt
Created January 26, 2016 18:30 — forked from neomatrix369/PerformanceRelated.md
Interesting links in the areas of HPC, low latency, mechanical harmony/sympathy, garbage collection
Everything I Ever Learned About JVM Performance Tuning @Twitter- by Attila Szegedi
http://www.infoq.com/presentations/JVM-Performance-Tuning-twitter (video & slides)
9 Fallacies of Java Performance - by Ben Evans
http://www.infoq.com/articles/9_Fallacies_Java_Performance (video & slides)
Visualizing Java GC - by Ben Evans
http://www.infoq.com/presentations/Visualizing-Java-GC (video & slides)