Skip to content

Instantly share code, notes, and snippets.

{
"36forecast": [
[
"condition",
"{}"
],
[
">",
"\"Weather from \" + datetime.fromtimestamp(int(message.data['hourly']['data'][36]['time'])).strftime(\"%A %d %B %H:%M\") + \" \" + \"; \".join([\"{0[summary]} {0[windSpeed]}mph bearing {0[windBearing]:03d}deg\".format(x) for x in message.data['hourly']['data'][36:]])"
],
#include <stdio.h>
int main(int argc, char* argv[])
{
char* i = 0;
char* str = "Hello, World";
for(i = str + 11; i >= str; i--)
putchar((char)*i);
@egelmex
egelmex / a.py
Last active August 29, 2015 14:03 — forked from vext01/a.py
x = 666
def print_x():
print(x) # OK, you can see x
def copy_x():
y = x # ok, you can copy x
def inc_x():
global x
x = x + 1 # local variable 'x' referenced before assignment?!
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
### Keybase proof
I hereby claim:
* I am egelmex on github.
* I am mex (https://keybase.io/mex) on keybase.
* I have a public key whose fingerprint is 74F0 627C 5A8D DAA5 CC99 C76F 6EAE F47A ED95 5BB3
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am egelmex on github.
  • I am mex (https://keybase.io/mex) on keybase.
  • I have a public key whose fingerprint is 74F0 627C 5A8D DAA5 CC99 C76F 6EAE F47A ED95 5BB3

To claim this, I am signing this object:

@egelmex
egelmex / parse_dec.ml
Last active December 17, 2015 07:09 — forked from vext01/parse_dec.ml
(*
* Parsing a decimal into an arbitrary precision number in Ocaml.
*
* Input not checked as the parser will sanitise the input.
*
* ocamlfind ocamlc -package num -linkpkg -o parse_dec parse_dec.ml
*)
open Num
open String
From cb6fd3ed76d6c128af19987998dccb7b2eed0ff4 Mon Sep 17 00:00:00 2001
From: egelmex <ellism88@gmail.com>
Date: Wed, 21 Nov 2012 10:56:06 +0000
Subject: [PATCH] Comments and type clarification.
Added doxygen comments. Some XXXs where I would like more details.
Converted types to use stdint types to make it precice what sizes we are
workign with.
---
vdp.cpp | 142 +++++++++++++++++++++++++++++++++++++++++++++++++-------------
web_browser = google-chrome
web_method = 1
web_VTE_CJK_WIDTH = 0
web_environ =
web_locale =
@egelmex
egelmex / gist:1261526
Created October 4, 2011 12:34
trying to connect to wirless
Oct 4 06:47:29 myhost NetworkManager[853]: <info> Activation (wlan0) starting connection 'eduroam'
Oct 4 06:47:29 myhost NetworkManager[853]: <info> (wlan0): device state change: disconnected -> prepare (reason'none') [30 40 0]
Oct 4 06:47:29 myhost NetworkManager[853]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
Oct 4 06:47:29 myhost NetworkManager[853]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
Oct 4 06:47:29 myhost NetworkManager[853]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled..
Oct 4 06:47:29 myhost NetworkManager[853]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Oct 4 06:47:29 myhost NetworkManager[853]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting..
Oct 4 06:47:29 myhost NetworkManager[853]: <info> (wlan0): device state change: prepare -> config (reason 'none) [40 50 0]
Oct 4 06:47:29 myhost NetworkManager[853]: <info> Activation (wlan0/wireless): connection 'eduroam' has secu