Skip to content

Instantly share code, notes, and snippets.

💥
Breaking Web [===>--------]

Nika Layzell mystor

💥
Breaking Web [===>--------]
Block or report user

Report or block mystor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mystor
mystor / cstring_outparam
Created Jul 19, 2019
Example session getting cstring outparameter
View cstring_outparam
(rr) p (nsCString*)malloc(sizeof(nsCString))
$65 = (nsCString *) 0x7f74904b3430
(rr) p $65->nsTString()
$66 = void
(rr) p uri->GetSpec(*$65)
$67 = nsresult::NS_OK
(rr) p $65->get()
$68 = 0x7f748a61c50c "about:blank"
@mystor
mystor / quiz.cpp
Created Feb 15, 2018
C++ Overloading Quiz
View quiz.cpp
void generic();
void specific();
template<typename T>
void f(T&&) {
generic();
}
void f(const int&) {
specific();
@mystor
mystor / icecc-jobs.pl
Last active Jun 15, 2019
A simple script for counting the avaliable jobs in an icecream network
View icecc-jobs.pl
#!/usr/bin/env perl
# This short script queries the icecream scheduler to discover what machines are connected,
# and sums the maximum job counts for all x86-64 machines.
# It can be used in your mozconfig as follows:
# mk_add_options MOZ_MAKE_FLAGS="-j$(icecc-jobs)"
# if this script is on your PATH, and named icecc-jobs
use List::Util qw(sum0);
@mystor
mystor / .bashrc
Created Aug 2, 2015
Spacemacs configuration for rust
View .bashrc
# You could also do this in emacs probably, but this is easier.
export RUST_SRC_PATH=/path/to/rust/checkout/src
export PATH="$PATH:/path/to/racer/binary/"
View index.js
var irc = require('irc');
var client = new irc.Client("irc.mozilla.org", "spoofme", {
channels: [ "#interns" ]
});
client.addListener("pm", function(from, msg) {
if (from === "mystor" && msg === "hack") {
client.say("#interns", "mystor: Help! Someone hacked me!");
@mystor
mystor / Compiling logs
Created Feb 26, 2015
Strange clang behaviour
View Compiling logs
% gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
% gcc test.c
Undefined symbols for architecture x86_64:
"_foo", referenced from:
_main in test-696342.o
@mystor
mystor / .gitignore
Created Jan 25, 2015
Ducky Preprocessor
View .gitignore
/target
/Cargo.lock
@mystor
mystor / main.c
Created Dec 2, 2014
Horrible SDL Hack
View main.c
#include "test.h"
int main() {
return real_main();
}
@mystor
mystor / changes.myst
Created Oct 3, 2014
Proposed Changes to Myst Object Syntax
View changes.myst
-- PROBLEM 1: Large objects as arguments
react.createClass Obj#{
render: fn ->
doSomething!
}
-- Becomes --
<{
react.createClass Obj#{
render: fn ->
<{ doSomething! }>
@mystor
mystor / parser.py
Created Jul 26, 2013
Quick port of [this gist](https://gist.github.com/Mystor/6086481) to Python using PLY
View parser.py
################
# ENTERING LEX #
################
###
# Define Tokens
###
tokens = (
'COURSE',
'RECOMMEND',
You can’t perform that action at this time.