Skip to content

Instantly share code, notes, and snippets.

View lucyllewy's full-sized avatar

Lucy Llewellyn lucyllewy

View GitHub Profile
@lucyllewy
lucyllewy / gist:8789010
Created February 3, 2014 18:04
this fails in emscripten with the printf reporting that the variable is 0 instead of my expected 4096 (causing issues in bochs compile)
#include <stdio.h>
#include <stdlib.h>
#define TEST 32
int main(int argc, char **argv) {
unsigned long int test = ((unsigned long int)(1) << TEST) / (1024*1024);
printf("%d should be %d", test, 4096);
@lucyllewy
lucyllewy / libvirt_iptables_forwarding
Created May 6, 2014 20:34
executes on libvirt domains starting up and shutting down to add and remove port forwards. useful for systems that only have a single public ip. plonk into /etc/libvirt/hooks, create a directory /etc/libvirt/iptables.d with a file for each domain you wish to forward ports to.
#!/bin/bash
# Copyright 2014 Daniel Llewellyn
# Released under GPLv3
# syntax for config file
# --
#PUBLIC_IP="1.2.3.4" # optional - the public ip address to listen on, will default to first public ip in `ip addr list` if unspecified or empty.
#PRIVATE_IP="192.168.122.x" # mandatory - the ip of the domain's natted network.
#PORTSPEC="80/tcp" # partially mandatory - public-side - can be just "80" in which case tcp is assumed, alternative to tcp, udp can be specified.
<polymer-element name="style-test" attributes="color" noscript>
<template>
<style>
.styled { color: red; }
.styled:after {
content: "Should be green!";
color: {{color}};
}
</style>
<p class="styled">The following text is red, but:</p>

Keybase proof

I hereby claim:

  • I am diddledani on github.
  • I am diddledan (https://keybase.io/diddledan) on keybase.
  • I have a public key whose fingerprint is 4C9C BFAD 0069 D679 9660 BCD5 40C2 D958 0349 ED21

To claim this, I am signing this object:

diff --git a/elfinder/connectors/php/connector.php b/elfinder/connectors/php/connector.php
deleted file mode 100644
index 0936f9d..0000000
--- a/elfinder/connectors/php/connector.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-error_reporting(0); // Set E_ALL for debuging
-
{
"backgrounds": [
{
"filename": "Ashness-Pier-Derwentwater-Lake-District-Cumbria-UK",
"alt": "Ashness Pier, Derwentwater, Lake District, Cumbria, UK."
},
{
"filename": "Bamford-Edge-Peak-District-Derbyshire-UK",
"alt": "Bamford Edge, Peak District, Derbyshire, UK."
},
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/iron-menu-behavior/iron-menubar-behavior.html">
<dom-module id="broadway-menubar">
<template>
<div class="selectable-content">
<content></content>
</div>
</template>
add the following:
export NODE_PATH="$NODE_PATH:$HOME/.npm-modules/lib/node_modules"
export PATH="$HOME/.npm-modules/bin:$PATH"
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@lucyllewy
lucyllewy / snapcraft.yml
Created May 3, 2017 01:15
Example of failing snapcraft build of fontconfig and freetype
name: fontconfig-fail
version: '0.1'
summary: Example failure of freetype and fontconfig
description: |
An example showing that compiling freetype and fontconfig will fail when
the compile tries to build fontconfig.
grade: devel
confinement: devmode