Skip to content

Instantly share code, notes, and snippets.

16:18 <+FrankiePotCheese> Just because its running code, that's just microcode
16:18 <+manuel> but i have no way of inferring if it is microcode or not, i can't upgrade it, i can't change it
16:18 -!- darwin_ [[email protected]] has joined ##programming
16:18 <+manuel> but how do i know if it is running code? someone at arm knows, i don't
16:18 <+FrankiePotCheese> But there is a live running scheduler, io handler, etc running under there
16:18 -!- Prophet5 [[email protected]] has quit [Remote host closed the connection]
16:19 <+manuel> there are subsystems, there is a bus scheduler
16:19 <+manuel> they are documented alright
16:19 <+ahokaomaeha> ssta: I take back the how many digits thing... I have something better - let's say g(x) = sum of x's digits... how many times do you have to
apply g repeatedly to F(10^7) until you get a digit (a number from 1 to 9)
#!/bin/bash
hextodec() {
until [ -z "$1" ]
do
i=`echo "$1" | tr '[:lower:]' '[:upper:]'`
echo "obase=10;ibase=16;$i" | bc
shift
done
}
@wesen
wesen / gist:5024421
Created February 24, 2013 16:25
make a release name
#!/bin/bash
hextodec() {
until [ -z "$1" ]
do
i=`echo "$1" | tr '[:lower:]' '[:upper:]'`
echo "obase=10;ibase=16;$i" | bc
shift
done
}
actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activesupport (3.2.8)
addressable (2.2.8)
asana-client (1.0.0)
builder (3.0.4)
bundler (1.2.4)
cap_gun (0.2.4)
capistrano (2.13.4)
function validateCreditCard($cardnumber, $cardname) {
if ($cardname[0]) {
// accept masked cc numbers
return true;
}
$ccErrorNo = 0;
$ccErrors = array ();
$ccErrors[0] = "Unknown card type.";
def getTweetData(user: String, json: String): List[Tweet] = {
// is list
val l = getList[Map[String, Any]](json)
for (map <- l) yield {
val text = map("text")
val retweets = map("retweets")
new Tweet(user, text.toString, retweets.toString.toDouble.toInt)
}
}
_main: ## @main
Leh_func_begin1:
## BB#0: ## %bb2
pushq %rbp
Ltmp0:
movq %rsp, %rbp
Ltmp1:
xorl %eax, %eax
popq %rbp
ret
@wesen
wesen / gist.c
Created September 29, 2013 21:19
_main: ## @main
Leh_func_begin1:
## BB#0: ## %bb2
pushq %rbp
Ltmp0:
movq %rsp, %rbp
Ltmp1:
xorl %eax, %eax
popq %rbp
ret
@wesen
wesen / euler_filter.py
Created May 21, 2015 17:52
euler filter addon for blender
import bpy
from math import pi
from mathutils import Euler
import itertools
bl_info = {
"name": "Euler Filter",
"author": "Manuel Odendahl",
"version": (0, 1),
"blender": (2, 74, 0),
pub fn new() -> Trie {
let mut t = Trie {
children: Vec::with_capacity(26),
// children: vec![None; 26],
cnt: 0,
children_cnt: 0
};
for _ in 0..26 {
t.children.push(None);
}