Skip to content

Instantly share code, notes, and snippets.

View mkuklis's full-sized avatar
🏃‍♂️

Michał Kuklis mkuklis

🏃‍♂️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mkuklis on github.
  • I am michal (https://keybase.io/michal) on keybase.
  • I have the public key with fingerprint 4CC4 26DF 45A8 5858 B8ED  A22C A674 443D E215 6841

To claim this, I am signing this object:

description "mongodb container"
author "ququplay"
start on filesystem and started docker
stop on runlevel [!2345]
respawn
script
# Wait for docker to finish starting up first.
FILE=/var/run/docker.sock
while [ ! -e $FILE ] ; do
inotifywait -t 2 -e create $(dirname $FILE)
var storage = {
init: function (success, error) {
window.requestFileSystem(PERSISTENT, 100 * 1024 * 1024, success, error);
},
write: function (fileName, content, success, error) {
this.init(function (fs) {
fs.root.getFile(fileName, { create: true }, function (fileEntry) {
fileEntry.createWriter(function (fileWriter) {
fileWriter.onwriteend = callback;
@mkuklis
mkuklis / split jruby-complete.jar windows
Created October 20, 2009 03:33
splits jruby-complete.jar windows
del jruby-core.jar
del ruby-stdlib.jar
rd /sq tmp_unpack
mkdir tmp_unpack
cd tmp_unpack
jar xf ../jruby-complete.jar
cd ..
mkdir jruby-core
move tmp_unpack/org jruby-core/
This example shows how to setup an environment running Rails 3 beta 3 under 1.9.2-head with a 'rails3' gem set.
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.2-head
# Switch to 1.9.2-head and gemset rails3, create if it doesn't exist.
∴ rvm --create use 1.9.2-head@rails3
@mkuklis
mkuklis / backbone_playground.js
Created November 15, 2010 08:05
playing with backbone
$(function() {
// data comes from server
var data = {title: "header title", body: "body title", background_color: "#ffffff"};
// setup site model and extend it with data from server
var Site = Backbone.Model.extend(data);
// header view
var HeaderView = Backbone.View.extend({
@mkuklis
mkuklis / gist:743060
Created December 16, 2010 05:09
cf9 test
<cfscript>
// creates message ready for Twitter for given paramaters
function createTwitterMessage(name, amount, activity, technology, location) {
return "Help " & name & " collect " & amount & " for " & activity & " in " & location;
}
</cfscript>
@mkuklis
mkuklis / gist:743062
Created December 16, 2010 05:11
cf9 function usage
<!DOCTYPE html>
<html>
<head></head>
<body>
<a href="http://twitter.com/share" class="twitter-share-button"
data-url="http://www.energyincommon.org"
data-text="<cfoutput>#createTwitterMessage("Frist Name Last Name", "$490.00", "Health Care", "Solar Home Systems", "Koni, Ghana")#</cfoutput>"
data-count="horizontal" data-via="energyincommon">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</body>
@mkuklis
mkuklis / gist:744463
Created December 17, 2010 03:55
message for twitter/facebook
<cffunction name="createMessage">
<cfargument name="name" required="true" type="string">
<cfargument name="amount" required="true" type="string">
<cfargument name="activity" required="true" type="string">
<cfargument name="technology" required="true" type="string">
<cfargument name="location" required="true" type="string">
<cfreturn "Help " & name & " collect " & amount & " for " & technology & " (" & activity & ") in " & location>
</cffunction>