Skip to content

Instantly share code, notes, and snippets.

View mislav's full-sized avatar

Mislav Marohnić mislav

View GitHub Profile
@mislav
mislav / MultiLinkedList.sol
Created October 5, 2018 18:33 — forked from benzap/MultiLinkedList.sol
Multi Linked List Implementation in Solidity
pragma solidity ^0.4.24;
/*
Title:
Multiple Linked List Storage
Description:
Dynamic Storage Contract for storing multiple linked lists each
uniquely identified by a key. Implementation allows for
@mislav
mislav / Gemfile
Last active August 29, 2015 14:18 — forked from janko/benchmark.rb
source "https://rubygems.org"
gem "minitest"
gem "rspec"
@mislav
mislav / log.txt
Created August 19, 2012 13:39 — forked from steveklabnik/log.txt
Analyze shell history; zsh edition + alias expansion
480 git commit -v
397 git status -sb
120 git add -p
53 git push
52 git diff
47 noglob bundle exec
45 ls -G
45 git branch -v
45 bundle
39 git push -u
@mislav
mislav / git-github-issues.rb
Created May 6, 2012 18:04 — forked from gorenje/feature_branch.rb
hub extension command
#!/usr/bin/env ruby -w
require 'net/https'
require 'json'
unless `git config --get-all remote.origin.url` =~ %r{\bgithub\.com[:/]([^/\s]+)/([^/\s]+)}
abort "no GitHub URL found in origin remote"
end
owner = $1
repo = $2.sub(/\.git$/, '')
@mislav
mislav / ghi.rb
Created April 27, 2010 19:25 — forked from marksands/ghi.rb
GitHub Issues power script
#!/usr/bin/env ruby
require "rubygems"
require "mutter"
require "httparty"
REMOTE = "origin"
REPO = `git config --get remote.#{REMOTE}.url`.chomp[/github\.com[\/\:]([^\/]+\/[^\/]+)\.git/, 1]
USER = `git config --get github.user`.chomp
TOKEN = `git config --get github.token`.chomp
@mislav
mislav / hoptoad_api.rb
Created April 22, 2010 22:59 — forked from croaky/hoptoad_api.rb
Active Resource model for Hoptoad
require 'active_resource'
ActiveResource::Base.class_eval do
private
alias original_find_or_create_resource_for find_or_create_resource_for
# names like "foo.bar" become "foo_bar" so constants lookup doesn't barf
def find_or_create_resource_for(name)
original_find_or_create_resource_for name.to_s.gsub('.', '_')
@mislav
mislav / git-amend.sh
Created January 16, 2010 13:43 — forked from nachof/git-amend.sh
git amend command
#!/usr/bin/env bash
git status >/dev/null
if [ $? -ne 0 ]; then
echo "Nothing to commit. Use git add first"
exit 1
fi
TARGET=$1
BRANCH=$(git name-rev HEAD | cut -d' ' -f2)
@mislav
mislav / description.txt
Created December 17, 2009 23:01 — forked from sprsquish/gist:259067
git workflow with peer review on topic branches
so my workflow is that each ticket gets a branch. Before merging the branch to master
it needs to be peer-reviewed. So sometimes I have a bunch of branches that are off
being reviewed while I work on something else.
Currently when I run "git branch" I see:
[branch 1]
[branch 2]
[branch 3]
*[branch 4]
[branch 5]
@mislav
mislav / survey
Created November 1, 2009 11:27 — forked from radar/survey.md
What did you do to get good at Rails?
Read source code, wrote plugins
Who taught you what you know?
Josh Susser! (about ActiveRecord)
Do you have any fond (or not so fond) memories of your learning experiences?
@mislav
mislav / twitter spammer.md
Created June 11, 2009 11:20 — forked from svenfuchs/What makes you a Twitter spammer?
What makes you a Twitter spammer?

Blocky (@blocky_bot) is a crowdsourcing solution for Twitter spam. Blocky does not define what a "spammer" is, so let's discuss.

What makes you a Twitter spammer?

  • You follow me just to make me follow you.

    It all comes down to this. Spammers can't spam if nobody follows them. Any relatively new account that already follows hundreds or thousands of people