Skip to content

Instantly share code, notes, and snippets.

Avatar

Jakob Jarmar jarmar

  • Göteborg, SE
View GitHub Profile
@jarmar
jarmar / gist:3295642
Created Aug 8, 2012
CSS3 margin box widths
View gist:3295642
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Margin box testing</title>
<style type='text/css'>
@page {
size: US-Letter;
margin: 1.5in 0.5in .5in 0.75in;
font: 11px Arial;
@jarmar
jarmar / gist:3073417
Created Jul 8, 2012
zte blade opengl problems
View gist:3073417
07-09 00:54:30.549 D/RumbleConnector(21206): readGameLists before fromjson
07-09 00:54:30.709 D/RumbleConnector(21206): readGameLists after fromjson
07-09 00:54:30.709 D/RumbleDataSource(21206): ReadGameListsTask.onPostExecute
07-09 00:54:30.719 I/ActivityManager(16844): START {cmp=se.maginteractive.rumble.free/se.maginteractive.rumble.activities.AdvertisingCompactActivity} from pid 21206
07-09 00:54:31.139 D/dalvikvm(21206): GC_FOR_ALLOC freed 3447K, 52% free 9593K/19847K, paused 286ms
07-09 00:54:31.239 D/dalvikvm(16844): GC_CONCURRENT freed 1641K, 41% free 9472K/15943K, paused 5ms+71ms
07-09 00:54:31.419 I/Ads (21206): To get test ads on this device, call adRequest.addTestDevice("84BFE329D6FDAA6F726FEF6744E9C9B3");
07-09 00:54:31.419 I/Ads (21206): adRequestUrlHtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>AFMA_getSdkConstants();AFMA_buildAdURL({"kw":[],"preqs":6,"session_id":"4770494074962062543","u_sd":1.5,"seq_num":"7","slotname":"a14fb21da413bcc","u_w":3
@jarmar
jarmar / gist:2998958
Created Jun 26, 2012
Mildly interesting card draws.
View gist:2998958
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <time.h>
int NUM_TRIES = 100000000;
void main(void) {
int successes = 0;
int deck_size;
@jarmar
jarmar / p2.hs
Created Apr 3, 2012
Opera april fools p2 (Haskell)
View p2.hs
import Data.Word
import Data.ByteString (pack, ByteString, writeFile)
import qualified Data.ByteString as ByteString
import Data.Char (digitToInt)
str = "01000010010110100110100000111001001100010100000101011001001001100101001101011001110111000101111101111010100011100000000000000000000110010101111110000000000000000001000001101000100001010111100000000000001010100100000000000100100000000011111111100111110111111110000000100000000000001000100100010001010011111101010000100001100001000001100100000011010000110100000001101000011010000011010101010011111100010001101000000100100110010001101000110010000000110110101001100000111101010010010100001111110001110101100101010111001110100100101000110011010001101001001101101011000000110001000110010100001110100001110100100001100011100100111101101101111100111110110110010100111010010011111100110100101101000110100000001010000000110110000001011010001101110110010011001111101011101100010001001000001101110010010111101001111001100010101110110011111110111000101110111000010110100000111101111
@jarmar
jarmar / p2.js
Created Apr 3, 2012
Opera april fools part 2
View p2.js
<script src="bzip2.js"></script>
<script type="text/javascript">
var bin, bin2, bin3, i
bin = "010000100101101001101000001110010011000101000001010110010010011001010011010110011101110001011111011110101000111000000000000000000001100101011111100000000000000000010000011010001000010101111000000000000010101001000000000001001000000000111111111001111101111111100000001000000000000010001001000100010100111111010100001000011000010000011001000000110100001101000000011010000110100000110101010100111111000100011010000001001001100100011010001100100000001101101010011000001111010100100101000011111100011101011001010101110011101001001010001100110100011010010011011010110000001100010001100101000011101000011101001000011000111001001111011011011111001111101101100101001110100100111111001101001011010001101000000010100000001101100000010110100011011101100100110011111010111011000100010010000011011100100101111010011110011000101011101100111111101110001011101110000101101000001111011111001000100111010011100110011111001110110000010000000