Skip to content

Instantly share code, notes, and snippets.

Fabio Kung fabiokung

Block or report user

Report or block fabiokung

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fabiokung
fabiokung / Usage.md
Last active Aug 29, 2015
base Docker image for Heroku Buildpacks
View Usage.md

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...
View multiline.diff
--- 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);
View keybase.md

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:

View class_methods.rb
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
View gist:1714377
$ MORE
-bash: MORE: command not found
@fabiokung
fabiokung / fiber.py
Created Dec 22, 2011
generators as fibers
View fiber.py
# 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 Dec 22, 2011
fibers as generators
View generators.rb
module Generators
def generator(&blk)
Fiber.new do
loop { Fiber.yield(blk.call) }
end
end
end
@fabiokung
fabiokung / pom.xml
Created Aug 6, 2011
vraptor-scaffold generated pom.xml, modified to work with older mvn (2.0.8)
View pom.xml
<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 Aug 6, 2011
modifications made on top of the version generated by spring-roo, to make it work with older mvn (2.0.8)
View pom.xml
<?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 Aug 6, 2011
slightly modified version from lift maven archetype version, in order to work with older mvn (2.0.8)
View pom.xml
<?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>
You can’t perform that action at this time.