Skip to content

Instantly share code, notes, and snippets.

View mntmn's full-sized avatar

minute mntmn

View GitHub Profile
@mntmn
mntmn / gist:2399376
Created April 16, 2012 15:11
Konversation mit Amazon Payments Deutschland
From: "amazonpayments-verkaeufer-performance@amazon.de" <amazonpayments-verkaeufer-performance@amazon.de>
To: "office@mnt.mn" <office@mnt.mn>
Subject: Ihr Amazon Zahlungskonto
Guten Tag von Amazon Payments.
Vielen Dank für Ihre Registrierung bei Amazon Payments.
Bei der Überprüfung Ihrer Website haben wir festgestellt, dass Sie "Bezahlen über Amazon" für den Verkauf digitaler Downloads nutzen möchten.
@mntmn
mntmn / sync_idea_module.rb
Created June 14, 2012 15:45
Script to convert a single-module IntelliJ IDEA Scala/SBT project and libraries into a module definition
require "nokogiri"
puts "launching gen-idea..."
puts `sbt gen-idea`
puts "finding module name..."
module_name=nil
basepath=".idea/libraries/"
@mntmn
mntmn / gist:3155824
Created July 21, 2012 13:25
robusta syntax 0.1
def process(t:String) {
print(t)
}
b:String = "world"
list = ["hello",b]
for (item <- list) {
process(item)
@mntmn
mntmn / hello.rb.c
Created November 2, 2012 01:00
A program that is ruby and C at the same time. Weird!
#ifndef false /*
#
# Written on Nov 2, 2012 by @mntmn
#
# This program is both ruby and C. Try it out:
#
# gcc hello.rb.c -o hello
# ./hello
#
@mntmn
mntmn / gist:5245015
Created March 26, 2013 12:29
Bookmarklet to count words in a Spacedeck Space
javascript:alert($("<div>"+controller.currentController.space.artifacts.map(function(a){return a.get("description")}).join(" ")+"</div>").text().replace(/\s+/g," ").split(" ").length+" words")
value :=
0..1599 // constant
*0..1599 // memory value
*0..1599+0..255 // memory content plus constant
*0..1599+*0..1599 // memory content plus other memory content
target := value // denotes a memory cell
@mntmn
mntmn / gist:6917091
Created October 10, 2013 11:45
thumb assembler in one page of c work in progress
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "slre.h"
char* asm_input;
uint16_t* thumb_output;
mov r3,#100
lsl r3,r3,#8
mov r4,#0
loopa:
mov r0,#1
lsl r0,r0,#29
mov r1,#50
sub r0,r0,r1
ds test
mov r8,r14 ; back up link-address in r8
mov r2,#0 ; r2 = 0
loopa:
mov r1,#99
lsl r1,r1,#4 ; r1 = 100<<4 = 1600 (40x40 zeichen display)
loopb:
ds test
mov r8,r14
sym font
mov r0,#0
loopa: