Skip to content

Instantly share code, notes, and snippets.

Janko Marohnić janko

Block or report user

Report or block janko

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
steveklabnik /
Last active Dec 19, 2015
Gems that may not be rails 4 compatible
mislav /
Last active Dec 19, 2015
Test-drive the new vim 7.4 prerelease
cd /tmp
wget -O- | tar -xj
cd vim74a
sudo mkdir -p /opt/vim
sudo chown $USER /opt/vim
PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure --prefix=/opt/vim --enable-rubyinterp | grep ruby
make && make install
View gist:6819142
Date: Thu, 3 Oct 2013 17:16:51 -0700
From: Gary Bernhardt <>
Subject: Mailing practices
I suspect that you guys know this, but just in case: your emailing
practices have been resulting in... less than good impressions among the
people you aim to recruit. Here are some tweets, none of which were
written by me:
mpapis / bad.rb
Last active Jan 1, 2016
I hate asymmetrical code
View bad.rb
apply_event :transfer_sent, :target_account_uid => target,
:amount => amount,
:new_balance => new_balance.amount,
:account_uid => uid
n1k0 / location.js
Created Jul 4, 2012
PhantomJS test script for window.location
View location.js
var page = require('webpage').create();
var base = phantom.args[0];
var path = phantom.args[1];
var expected = phantom.args[2];
page.onNavigationRequested = function(url, navigationType, navigationLocked, isMainFrame) {
console.log('Navigation requested: ' + navigationType + '; ' + url);
if (!page.testStarted) {
DonSchado /
Created May 11, 2016
140 character rails application that returns http status 200
require'action_controller/railtie';run{config.secret_key_base=?x;routes{root to:->_{[200,{},[]]}}}.initialize!
tenderlove / terrible.rb
Last active May 31, 2016
I am a terrible person
View terrible.rb
require 'fiddle'
module IAmAHorriblePerson
def unset flag
value = _wrap self
flags = { |i| value[i] }.pack('C8').unpack('Q').first
[flags & ~flag].pack('Q').unpack('C8').each_with_index { |n,i|value[i] = n }
def class= k
MarkMurphy /
Last active Aug 7, 2016
Multipart Upload API

Endpoints for uploading large files in multiple chunks. Also has the ability to resume if the upload is interrupted.

Typical usage:

  1. Send a POST request to /files with the first chunk of the file and receive an upload id in return.
  2. Repeatedly PATCH subsequent chunks using the upload id to identify the upload in progress and an offset representing the number of bytes transferred so far.
  3. After each chunk has been uploaded, the server returns a new offset representing the total amount transferred.
  4. After the last chunk commit the upload by passing its id to another endpoint such as POST /videos, POST /audio, etc.


jordwalke / gist:6350319
Last active Sep 10, 2016
ReactJS: JavaScript just like you've always done it.
View gist:6350319
* ReactJS: JavaScript like you've always done it.
* This example renders your top ten most followed friends/followers, `filter`ing
* only your favorites, and putting a star on all verified accounts.
* With ReactJS, any time your data changes, the UI is always brought up to date
* automatically. If friends length changes, or followCount - it always shows what
* `render` describes.
nateberkopec / gist:11dbcf0ee7f2c08450ea
Last active Sep 17, 2018
RubySpec is dead, long live RubySpec!
View gist:11dbcf0ee7f2c08450ea

Last night, Brian Shirai unilaterally "ended" the RubySpec project, a sub-project of Rubinius (the alternative Ruby implementation which Brian was paid to work on full-time from 2007 to 2013). The blog post describing his reasons for "ending" the project led to a big discussion on Hacker News.

When a single, competing Ruby implementation tells that you its test suite is the One True Way, you should be skeptical. Charles Nutter, Ruby core committer and JRuby head honcho, spent a lot of time last night on Twitter talking to people about what this decision means. He's probably too busy and certainly too nice of a guy to write about what is a political issue in the Ruby community, so I'm going to do it on behalf of all the new or intermediate Rubyists out there that are confused by Brian's decision and what it me

You can’t perform that action at this time.