Skip to content

Instantly share code, notes, and snippets.

View riffraff's full-sized avatar

Gabriele Renzi riffraff

View GitHub Profile
@riffraff
riffraff / gist:2fdf81e78255cae719bc8cb0fe6d92bf
Created February 20, 2022 06:11
Equal Rites - the bit with Granny and Eskarina staring at each other in a conflict of wills
Esk gazed down defiantly. Granny glared up sternly. Their wills clanged like cymbals and the air between them thickened.
But Granny had spent a lifetime bending recalcitrant creatures to her bidding and, while Esk was a surprisingly strong
opponent, it was obvious that she would give in before the end of the paragraph.
from importlib.machinery import ModuleSpec
from .source import make_source
# For some reasons I need to be able to have dynamically generated modules so I can do
#
# from borsa_italiana.isin.<dynamic value> import Source
#
MAGIC_MODULE_NAME = 'borsa_italiana.isin'
MODULE_PATH = [] # dummy, but we need to set it to something, but why?

Keybase proof

I hereby claim:

  • I am riffraff on github.
  • I am riffraff (https://keybase.io/riffraff) on keybase.
  • I have a public key whose fingerprint is 20DC 1E25 497A 99D8 7D6F 6A2B E134 B543 8C61 DAC8

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am riffraff on github.
  • I am riffraff (https://keybase.io/riffraff) on keybase.
  • I have a public key whose fingerprint is CDF5 BD15 3CBC F3D3 F7DF B669 5951 B1E4 CB1A EA67

To claim this, I am signing this object:

#!/usr/bin/env ruby
# vim: syntax=ruby
require 'timeout'
timeout = (ENV['TIMEOUT'] || 2*60*60).to_i
def log str
puts "run-forever: #{str}"
end
ssh ()
{
REMOTE_TERMINAL_THEME_NAME="Solarized Light";
SSH=$(which ssh);
CURTHEME=$(osascript -e "tell application \"Terminal\" to get the name of current settings of the selected tab of the front window");
CURTAB=$(osascript -e "tell application \"Terminal\" to get the selected tab of the front window");
osascript -e "tell application \"Terminal\" to set current settings of $CURTAB to settings set \"$REMOTE_TERMINAL_THEME_NAME\"";
$SSH "$@";
osascript -e "tell application \"Terminal\" to set current settings of $CURTAB to settings set \"$CURTHEME\""
}

Keybase proof

I hereby claim:

  • I am riffraff on github.
  • I am riffraff (https://keybase.io/riffraff) on keybase.
  • I have a public key whose fingerprint is 2E84 DF2D 6038 DAA0 F7D5 1B66 32BB 1A7F 22C3 BB65

To claim this, I am signing this object:

$ otool -l ./Contents/Resources/bin/ozemulator
./Contents/Resources/bin/ozemulator:
Load command 0
cmd LC_SEGMENT_64
cmdsize 72
segname __PAGEZERO
vmaddr 0x0000000000000000
vmsize 0x0000000100000000
fileoff 0
filesize 0
Multiple markers at this line
- exception during macro expansion: java.lang.NullPointerException at
scala.tools.nsc.interactive.ContextTrees$class.addContext(ContextTrees.scala:78) at
scala.tools.nsc.interactive.Global.addContext(Global.scala:28) at
scala.tools.nsc.interactive.Global.registerContext(Global.scala:268) at scala.tools.nsc.typechecker.Contexts
$Context.make(Contexts.scala:295) at scala.tools.nsc.typechecker.Contexts$Context.make0(Contexts.scala:
320) at scala.tools.nsc.typechecker.Contexts$Context.make(Contexts.scala:327) at
scala.tools.nsc.typechecker.Typers$Typer.atOwner(Typers.scala:5662) at
scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:33) at
scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:28) at
@riffraff
riffraff / gist:7500698
Created November 16, 2013 14:21
freezes online elm repl
iterate n f x =
if n == 0 then x
else iterate(n - 1 f f(x))
square x = x * x
main = asText (iterate 4 square 0)