Skip to content

Instantly share code, notes, and snippets.

View lukegb's full-sized avatar
🦦
👖

Luke Granger-Brown lukegb

🦦
👖
View GitHub Profile
@lukegb
lukegb / howmuch.html
Last active May 15, 2021 18:05
shiptoasting
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.total-money {
font-weight: bold;
}
.container td {
padding: 0.2rem 0.5rem;
}
.slider {
#!/bin/bash
set -e
pushd /tmp/src
if [[ `go list -f {{.Incomplete}}` == "true" || ! -z "$IMPORT_URL" ]]; then
INSTALL_URL=${INSTALL_URL:-$IMPORT_URL}
if [[ ! -z "$IMPORT_URL" ]]; then
popd
echo "Assembling GOPATH"
export GOPATH=`realpath $HOME/go`
mkdir -p "$GOPATH/src/$IMPORT_URL"
From 096a484096decc41122e312d52a4fd615266fe43 Mon Sep 17 00:00:00 2001
From: Luke Granger-Brown <[email protected]>
Date: Sun, 26 Jul 2020 00:44:44 +0100
Subject: [PATCH 7/7] Fix gr-hovercard-behavior under Firefox.
Firefox doesn't implement toElement/fromElement (they're not in the spec,
and were implemented by Chrome apparently for compatibility with IE), but
does implement target and relatedTarget, which are part of the UI Events
spec (https://w3c.github.io/uievents/#interface-mouseevent).
Hello,
My name is Elad Cohen and I'm a candidate to the RIPE Board in the near elections that will take place on the 13th of this month.
I created a technical solution that there will be more 4,294,967,296? IPv4 addresses for the 5 Regional Internet Registries including RIPE, you can read more about it here:
https://www.ripe.net/ripe/mail/archives/members-discuss/2020-April/003676.html
The "IPv4 Exhaustion" problem will be behind us and each RIPE member will receive at least a free /21 of IPv4 addresses if I will be elected, no one else will implement my technical solution, I'm asking for your online vote, without your online vote in the near RIPE general meeting, my above technical solution will not be implemented.
Please register for online voting for the RIPE elections using the following link:
[lukegb@auth ~]$ sudo ls /proc/$(pgrep java)/fd | wc -l; curl -I https://auth.spongepowered.org/avatars/lol768 >/dev/null; sudo ls /proc/$(pgrep java)/fd | wc -l
1181
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 47904 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
1183
[lukegb@auth ~]$ sudo ls /proc/$(pgrep java)/fd | wc -l; curl -I https://auth.spongepowered.org/avatars/lol768 >/dev/null; sudo ls /proc/$(pgrep java)/fd | wc -l
1183
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
@lukegb
lukegb / react.py
Created January 15, 2016 16:47
Calling React from Python? Certainly!
import dukpy
ctx = dukpy.RequirableContext(['/homes/leg13/test/node_modules'])
ret = ctx.evaljs("""
var React = require('react');
var HelloWorld = React.createClass({
render: function() {
return React.createElement('p', null, 'Hi!');
}
@lukegb
lukegb / dukpy.py
Created January 13, 2016 04:19
I went a little overboard
import django
django.setup()
from dukpy import Context
from ore.projects.models import Project
ctx = Context()
ctx.define_global_obj("Project", Project)
ctx.define_global_func("get_first_project_for_namespace", lambda name: Project.objects.filter(namespace__name=name).first())
@lukegb
lukegb / markdown.py
Last active January 12, 2016 17:20
I'm sorry...
import json
from django.contrib.staticfiles import finders
import execjs
ctx = None
def load_mdit():
global ctx
if ctx:
app.directive('loginField', function($timeout) {
return {
require: 'ngModel',
link: function(scope, elem, attrs, ctrl) {
ctrl.$validators.loginform = function(modelValue, viewValue) {
return true;
};
$timeout(function() {
ctrl.$setTouched();
ctrl.$validate();

Keybase proof

I hereby claim:

  • I am lukegb on github.
  • I am lukegb (https://keybase.io/lukegb) on keybase.
  • I have a public key whose fingerprint is A600 0237 AD44 EEA9 1EA7 A39D 0F53 FD27 EEAA 9331

To claim this, I am signing this object: