Skip to content

Instantly share code, notes, and snippets.

@acmi
acmi / UnrealScript.g4
Created April 14, 2016 06:35
UnrealScript antlr4 grammar
grammar UnrealScript;
program : classdecl
( declarations | replicationblock | body)*
( defaultpropertiesblock )?
;
// CLASS
classdecl : CLASS identifier ( EXTENDS packageidentifier )? ( classparams )* ';';
classparams : constclassparams
| WITHIN packageidentifier
@hfreire
hfreire / qemu_osx_rpi_raspbian_jessie.sh
Last active February 4, 2025 00:47
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@laindir
laindir / Makefile
Created October 8, 2014 17:05
An example of using interface types in C
CFLAGS=-Wall -Wextra -pedantic -ansi -g
main: file_logger.o string_logrecord.o
main.o: ilogger.h file_logger.h string_logrecord.h
file_logger.o: ilogger.h file_logger.h
string_logrecord.o: ilogger.h string_logrecord.h
@ryanchang
ryanchang / lldb_cheat_sheet.md
Last active April 10, 2025 20:02
LLDB Cheat Sheet

LLDB Cheat Sheet

A complete gdb to lldb command map.

Print out

  • Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
  • p - Print primitive type
@karablin
karablin / defer.rs
Last active January 2, 2021 02:10
go-like defer for rust
#[feature(macro_rules)];
struct ScopeCall<'cls> {
c: 'cls ||
}
#[unsafe_destructor]
impl<'cls> Drop for ScopeCall<'cls> {
fn drop(&mut self) {
(self.c)();
}
@roxlu
roxlu / .gitignore
Last active September 17, 2020 05:49
Super basic glfw setup - this uses GLFX to setup function pointers
._DS*
*DS_Store*
build
install
extern
node-*
references
@currencysecrets
currencysecrets / automatedTrendLines.mq4
Created July 9, 2012 09:07
MQL4: Automated Trend Lines
//+------------------------------------------------------------------+
//| Automated Trend Lines.mq4 |
//| Ryan Sheehy, CurrencySecrets.com |
//| http://www.currencysecrets.com |
//+------------------------------------------------------------------+
#property copyright "Ryan Sheehy, CurrencySecrets.com"
#property link "http://www.currencysecrets.com"
/*
* This script automates the generation and plotting of sloping trend