Skip to content

Instantly share code, notes, and snippets.

View ku1ik's full-sized avatar
👋

Marcin Kulik ku1ik

👋
View GitHub Profile

Given this:

export PATH=.bundle/bin:$PATH

Autocompleting of binaries from $PWD/.bundle/bin works in bash but not in zsh.

Given this:

export PATH=/proc/self/cwd/.bundle/bin:$PATH
@ku1ik
ku1ik / gist:5196377
Last active December 15, 2015 03:39
angular.module('time', [])
.directive('accordion', function() {
return function(scope, element, attrs) {
element.find('li').bind('click', function() {
var $li = $(this);
// show $li, hide others
var $calendar = $li.find('.calendar')
var scope = angular.element($calendar).scope()
scope.onDisplayed()
});
@ku1ik
ku1ik / gist:4751422
Last active December 12, 2015 09:28

Looking for a good name for developer's proxy server that can autospawn whole range of web apps (Rails, Sinatra, Django, Flask..., anything that can listen on $PORT passed via env). Similar thing to Pow but not limited to Rack apps. Routes all HTTP requests for foobar.dev (also foobar.lvh.me and foobar.1.2.3.4.xip.io) to the app symlinked as "foobar" in the central "apps dir".

Suggestions so far:

  • frontal
  • full frontal
  • polycorn
  • crossbreed
  • polyester
  • chameleon
# option 1
upstream ups {
server unix:/tmp/$appname.sock fail_timeout=0;
server unix:/tmp/backup.sock fail_timeout=0;
}
server {
listen 80;
server_name _;
@ku1ik
ku1ik / gist:4241708
Created December 8, 2012 20:09
Using ag (aka The Silver Searcher) with ack.vim
" .vimrc
let g:ackprg = 'ag --nogroup --nocolor --column'
@ku1ik
ku1ik / rvm_remove_old.sh
Created December 4, 2012 10:52 — forked from solnic/rvm_remove_old.sh
Remove all rubies older than given date
#!/bin/bash
DATE=${1:-2012-06-01} # allow passing date via DATE env var
for version in `find $rvm_path/rubies/ -mindepth 1 -maxdepth 1 -type d -not -newermt $DATE | cut -d / -f 7`; do rvm remove $version; done
@ku1ik
ku1ik / gist:3930651
Created October 22, 2012 09:38
You don't need bundle exec, rbenv-bundler and other bundler integration scripts

You don't need bundle exec, rbenv-bundler or other bundler integration scripts

You just need 2 things

Just prepend $PATH with .bundle/bin:

$ cat ~/.bashrc
...
export PATH=".bundle/bin:$PATH"

...

@ku1ik
ku1ik / asciiio.rb
Created October 11, 2012 21:06
Homebrew install formular for ascii.io recorder
require 'formula'
class Asciiio < Formula
# always gets the latest version, since ascii.io-cli
# doesn't have any versioning schemes going on
head 'git://github.com/sickill/ascii.io-cli.git'
homepage 'https://github.com/sickill/ascii.io-cli'
def install
<html>
<head>
<script id="worker1" type="javascript/worker">
function work() {
postMessage('work');
setTimeout(work, 3);
}
work();
Dear Marcin Kulik,
Thank you for contacting HTC
This matters has already been escalated and our development department undertaking appropriate steps to release the kernel source code.
KSC will be released as soon as possible.
The release will be notified through the official website of HTC.