Skip to content

Instantly share code, notes, and snippets.

View alivesay's full-sized avatar

Andrew Livesay alivesay

View GitHub Profile
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output omit-xml-declaration="yes" method="text" />
<xsl:strip-space elements="*" />
<xsl:template match="notices">
<xsl:text>\documentclass[paper=a4,10pt]{scrlttr2}
\usepackage{pstricks}
\usepackage{fontspec}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{graphics}
@alivesay
alivesay / eacces.stp
Last active December 22, 2015 08:08
SystemTap script to view the top processes syscalls returning EACCES (and related files)
#!/bin/env stap
global errors, files[50000]
probe syscall.open,
syscall.write,
syscall.read,
syscall.pread,
syscall.pwrite
{
@alivesay
alivesay / pong
Created September 19, 2013 22:36
function(msg) {
return "ping";
}
{
"number" : 6,
"people" : [
{
"name" : "Oleg Kotov",
"title" : "Soyuz Commander",
"country" : "russia",
"launchdate" : "2013-09-25",
@alivesay
alivesay / gist:7028958
Created October 17, 2013 17:30
Sup with scala field annotations?
Welcome to Scala version 2.10.0-20121205-235900-18481cef9b (OpenJDK 64-Bit Server VM, Java 1.7.0_40).
Type in expressions to have them evaluated.
Type :help for more information.
scala> class MyAnno extends scala.annotation.StaticAnnotation
defined class MyAnno
scala> case class Foo(@(MyAnno @scala.annotation.meta.field) x:Int)
defined class Foo
@alivesay
alivesay / gist:7126836
Last active December 26, 2015 09:08
C++ initialization list example
class Foo {
public:
void Foo(int p_x);
private:
int _x;
}
void Foo::Foo(int p_x) :
_x(p_x)
{
@alivesay
alivesay / emma.asm
Last active December 27, 2015 12:59
alpha source for emma
channel[*].USER_JOINED_EVENT(user) = {
IF user.nick == 'leofseige':
channel.send('Hello master!');
}
message[*].MESSAGE_EVENT(user_or_channel) = {
IF message == 'ping':
user_or_channel.send('pong');
}
_.-~-.
7'' Q..\
_7 (_
_7 _/ _q. /
_7 . ___ /VVvv-'_ .
7/ / /~- \_\\ '-._ .-' / //
./ ( /-~-/||'=.__ '::. '-~'' { ___ / // ./{
V V-~-~| || __''_ ':::. ''~-~.___.-'' _/ // / {_ / { /
VV/-~-~-|/ \ .'__'. '. ':: _ _ _ ''.
/ /~~~~||VVV/ / \ ) \ _ __ ___ ___ ___(_) | | __ _ .::'
Native Chrome JavaScript.
Copyright (c) 2013 Google Inc
var map = [];
var x = {};
x
=> {}
map[x] = 1;
=> 1
map
=> [ '[object Object]': 1 ]
var BitObject = {
mixins: null,
id: 0,
generateID: function () {
return BitObject.id++;
},
create: function () {
var newObject = Object.create(this);