Skip to content

Instantly share code, notes, and snippets.

View FireyFly's full-sized avatar

FireFly FireyFly

View GitHub Profile
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@thejh
thejh / bot.coffee
Created August 14, 2011 21:38
My IRC bot, jhbot
coffee = require 'coffee-script'
https = require 'https'
npm = require 'npm'
Irc = require 'irc-js'
cradle = require 'cradle'
{GitHubApi} = require 'github'
request = require 'request'
gitHubApi = new GitHubApi()
githubIssueApi = gitHubApi.getIssueApi()
githubObjectApi = gitHubApi.getObjectApi()
@robotlolita
robotlolita / core.harm
Created November 2, 2011 18:58
Harmonia's silly example
### core.harm --- Harmonia's core library
#
# This module provides the core functions from Harmonia implemented in
# Harmonia itself.
# Booleans are just plain functions, receiving two function bodies and
# calling the appropriate one.
let true [a {}, b {}] {
call a
};
@dherman
dherman / monocle-mustache-semi.js
Created December 1, 2011 08:24
Monocle-mustache using semicolons (intuition: blocks and statements, not object literals)
// inspired by https://github.com/raganwald/homoiconic/blob/master/2011/11/sans-titre.md#readme
// and by https://groups.google.com/a/dartlang.org/group/misc/browse_thread/thread/611c04100ac17142
// traditional method chaining with combinators:
console.log(range(1, 3)
.concat(range(4, 6))
.map(function(x) { return x * x })
.filter(function(x) { return x % 2 === 0 })
.reverse());
@robotlolita
robotlolita / api.doll
Created December 13, 2011 02:10
Collection API -- 4th attempt
Module collection
Interface Iterator<C<E>>
next :: (E, C<E> -> Ignored Any) -> Promise
exhausted_p :: () -> Bool
Interface Traversable<C<E>>
each :: C<E>, (E, C<E> -> Ignored Any) -> Undefined
Interface Building<C<E>>
add :: C<E>, value:E -> C<E>
@Gozala
Gozala / example.js
Created January 29, 2012 03:46
Workaround for lack of "tail call optimization" in JS
// Lack of tail call optimization in JS
var sum = function(x, y) {
return y > 0 ? sum(x + 1, y - 1) :
y < 0 ? sum(x - 1, y + 1) :
x
}
sum(20, 100000) // => RangeError: Maximum call stack size exceeded
// Using workaround
@rmmh
rmmh / A.mdown
Created April 9, 2012 04:36
DPCU-16 Spec Suggestions

DCPU-16 Spec Suggestions

  1. Evaluate b before a

This makes instructions that address the stack twice meaningful instead of confusing and useless.

ADD PEEK, POP should pop the top of the stack and add it to the second entry, but currently the PEEK is evaluated before the POP occurs.

  1. Add [SP+next word] addressing
@judofyr
judofyr / display.dasm
Created April 12, 2012 13:05
more assembly from 0x10c leak
; Printing stuff to the screen
; by Markus Persson
#macro clear(color) {
push(a)
set a, color
shl a, 8
bor a, 0x20
mem_fill(0x8000, 0x180, a)
set [screen_p], 0
@daeken
daeken / security.md
Created August 16, 2012 03:05
Outline
  • Intro
    • Mindset
      • Break all the things
    • Understanding is key
      • Security people are the most diverse in tech for that reason
  • Web security
    • Tools
      • Burp
    • XSS
    • CSRF
@tangrs
tangrs / bin2elf.sh
Last active April 15, 2024 02:34
Convert a memory dump/raw binary image into an ELF file
#!/bin/sh
# Convert a raw binary image into an ELF file suitable for loading into a disassembler
cat > raw$$.ld <<EOF
SECTIONS
{
EOF
echo " . = $3;" >> raw$$.ld