Skip to content

Instantly share code, notes, and snippets.

View gyulalaszlo's full-sized avatar

Gyula László gyulalaszlo

View GitHub Profile
@gyulalaszlo
gyulalaszlo / install_rails_stack.sh
Created August 10, 2011 02:58
Debian from blank install to RVM + Ruby 1.9.2 + MongoDB 1.8.2 + NGINX + Passenger + Node + Coffee
#!/usr/bin/env bash
echo '=========================== '
echo 'This script will attempt to install on a blank Debian Lenny / Squeeze: '
echo ' '
echo 'RVM with Ruby 1.9.2 '
echo 'NodeJS v0.4.10 with NPM and Coffee-Script '
echo 'MongoDb for the DB '
echo 'Imagemagick for the MiniMagick gem '
echo 'Passanger with nginx '
@gyulalaszlo
gyulalaszlo / init_repo.sh
Created August 11, 2011 12:20
create an empty git repo at /git/<repo>.git
#/usr/bin/env bash
# Create a git repo in the root git dir, and grant ownership to this user
if [ -z $1 ]
then
echo "Usage: $0 <repo name> [checkout_path]"
echo "Missing repo name"
exit $E_MISSING_POS_PARAM
fi
@gyulalaszlo
gyulalaszlo / gist:1244900
Created September 27, 2011 12:06
couchbase rake fail
~ ❯ cd Developer/couchbase
couchbase ❯ rake
Setting otp_keep="*" for building plugins
Making file task: /Users/gyulalaszlo/Developer/couchbase/dependencies/geocouch
file /Users/gyulalaszlo/Developer/couchbase/build/lib/couchdb/plugins/geocouch => /Users/gyulalaszlo/Developer/couchbase/dependencies/geocouch
/Users/gyulalaszlo/Developer/couchbase/build/bin/autoconf2.59 => /Users/gyulalaszlo/Developer/couchbase/build/bin/autoconf
/Users/gyulalaszlo/Developer/couchbase/build/bin/autoheader2.59 => /Users/gyulalaszlo/Developer/couchbase/build/bin/autoheader
/Users/gyulalaszlo/Developer/couchbase/build/bin/autom4te2.59 => /Users/gyulalaszlo/Developer/couchbase/build/bin/autom4te
./otp_build autoconf
@gyulalaszlo
gyulalaszlo / gist:1245138
Created September 27, 2011 14:14
couchbase make fail
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/Users/gyulalaszlo/Developer/couchbase/install/bin" || config/install-sh -c -d "/Users/gyulalaszlo/Developer/couchbase/install/bin"
/bin/sh ./libtool --mode=install /usr/bin/install -c vbuckettool vbucketkeygen '/Users/gyulalaszlo/Developer/couchbase/install/bin'
libtool: install: /usr/bin/install -c .libs/vbuckettool /Users/gyulalaszlo/Developer/couchbase/install/bin/vbuckettool
libtool: install: /usr/bin/install -c .libs/vbucketkeygen /Users/gyulalaszlo/Developer/couchbase/install/bin/vbucketkeygen
test -z "/Users/gyulalaszlo/Developer/couchbase/install/share/man/man3" || config/install-sh -c -d "/Users/gyulalaszlo/Developer/couchbase/install/share/man/man3"
test -z "/Users/gyulalaszlo/Developer/couchbase/install/share/man/man4" || config/install-sh -c -d "/Users/gyulalaszlo/Developer/couchbase/ins
@gyulalaszlo
gyulalaszlo / gist:1245254
Created September 27, 2011 14:53
couchbase make fail clang
Removing libtool
Removing m4/libtool.m4
Removing m4/ltoptions.m4
Removing m4/ltsugar.m4
Removing m4/ltversion.m4
Removing m4/lt~obsolete.m4
Removing m4/version.m4
Removing src/.deps/
Removing src/.dirstamp
Removing src/config.h
@gyulalaszlo
gyulalaszlo / abingo_logAnal.thor
Created January 16, 2012 01:31
Mopping up the floor after ABingo shits itself
#encoding: UTF-8
require 'rubygems'
require 'builder'
#Started POST "/gyorskereso/repjegy/purchase?url=http%3A%2F%2Fflight1.onlinetravel.ch%2Fcgi-bin%2Fflightmore" for 188.36.35.62 at 2011-12-03 04:11:57 +0000
REQUEST_LINE = /^Started ([A-Z]+) "(.*?)" for ([0-9\.]+) at (.*?)$/
LAYOUT_RENDER_LINE = /^Rendered (.*?) within (.*?) \(/
ABINGO_BINGO = /ABingo#bingo!/
@gyulalaszlo
gyulalaszlo / quicksearch.coffee
Created September 10, 2012 16:06
STA szallasfoglalo transcode
from_date_strings = (s1, s2)->
s2 = "0#{s2}" if s2 < 10
"#{s2}.#{s1[4..5]}.#{s1[0..3]}"
$(->
$('#repcsi_es_szallas form').submit ->
self = this
t = (sc)-> $(sc, self)
@gyulalaszlo
gyulalaszlo / haml_watcher.thor
Last active December 13, 2015 20:39
A Thor task to watch a (directory of .haml templates and compile them to another directory. See usage.md at the bottom.
# Script to watch a directory for any changes to a haml file
# and compile it.
# Copyright © 2013 Gyula László. Code released under the DWTFYW License.
require 'fssm'
require 'haml'
class HamlWatch < Thor
@gyulalaszlo
gyulalaszlo / dag_processing_test.rb
Last active August 29, 2015 14:18
Example of processing a DAG in ruby
class Task
attr_reader :key, :deps, :block, :all_dependencies
# Creates a new task
def initialize key, &to_do_block
@key, @deps, @all_dependencies = key, [], []
@block = to_do_block.to_proc if to_do_block
end
# Mark the dependencies of this task
@gyulalaszlo
gyulalaszlo / clj-dag.clj
Last active August 29, 2015 14:18
Simple Clojure code to solve a DAG
; Takes a list of tasks and their dependencies, solves a DAG
; and returns the order in which the tasks
; should be run, grouping the paralellizable tasks into lists.
;
; Transforms this task list:
; {:sql_1 []
; :sql_sum [:sql_1]
; :sql_3 []
; :view [:sql_1 :sql_sum]}
;