Skip to content

Instantly share code, notes, and snippets.

@fabiokung
fabiokung / Usage.md
Last active August 29, 2015 14:01
base Docker image for Heroku Buildpacks

as a buildpack maintainer

$ git clone https://github.com/heroku/heroku-buildpack-ruby.git  # or any other buildpack
$ cd heroku-buildpack-ruby
heroku-buildpack-ruby $ cat Dockerfile
FROM fabiokung/heroku-buildpack-base

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q ruby2.0
# more stuff specific to this buildpack...
--- irssi-0.8.15/src/fe-text/gui-readline.c 2010-04-03 17:19:42.000000000 +0100
+++ irssi-0.8.15/src/fe-text/gui-readline.c 2012-05-24 10:25:04.000000000 +0100
@@ -64,6 +64,7 @@
static char *paste_old_prompt;
static int paste_prompt, paste_line_count;
static int paste_join_multiline;
+static int paste_send_multiline;
static int paste_timeout_id;
static void sig_input(void);

Keybase proof

I hereby claim:

  • I am fabiokung on github.
  • I am fabiokung (https://keybase.io/fabiokung) on keybase.
  • I have a public key whose fingerprint is 7D74 D265 9FD2 2C7F 4DBF CCE1 154F 9506 8763 CF29

To claim this, I am signing this object:

class Stuff
def self.conf(*names)
names.each do |name|
define_singleton_method(name) do
@confs ||= {}
@confs[name]
end
define_singleton_method("#{name}=") do |value|
@confs ||= {}
@confs[name] = value
$ MORE
-bash: MORE: command not found
@fabiokung
fabiokung / fiber.py
Created December 22, 2011 20:31
generators as fibers
# python 2.7.x
class Fiber:
def __init__(self, callback):
self._callback = callback()
def resume(self):
return self._callback.next()
@fabiokung
fabiokung / generators.rb
Created December 22, 2011 20:05
fibers as generators
module Generators
def generator(&blk)
Fiber.new do
loop { Fiber.yield(blk.call) }
end
end
end
@fabiokung
fabiokung / pom.xml
Created August 6, 2011 10:33
vraptor-scaffold generated pom.xml, modified to work with older mvn (2.0.8)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.fabiokung</groupId>
<artifactId>myproject</artifactId>
<packaging>war</packaging>
<version>0.1.0</version>
<name>myproject</name>
<repositories>
@fabiokung
fabiokung / pom.xml
Created August 6, 2011 09:31
modifications made on top of the version generated by spring-roo, to make it work with older mvn (2.0.8)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>app</groupId>
<artifactId>roo_heroku</artifactId>
<packaging>war</packaging>
<version>0.1.0</version>
<name>app</name>
<properties>
<roo.version>1.1.5.RELEASE</roo.version>
@fabiokung
fabiokung / pom.xml
Created August 6, 2011 09:28
slightly modified version from lift maven archetype version, in order to work with older mvn (2.0.8)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.fabiokung</groupId>
<artifactId>lift_heroku</artifactId>
<version>0.1.0</version>