Skip to content

Instantly share code, notes, and snippets.

Alexander Dimitrov adimitrov

  • Sofia, Bulgaria
Block or report user

Report or block adimitrov

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
mikeyk /
Created Jan 16, 2013
Watch_wal-e script
#! /usr/bin/env python
from import SESConnection
import os
import sys
import subprocess
import socket
TMPFILE = '/var/run/postgresql/last-wal-archive-error-file.tmp'
if __name__ == '__main__':
postmodern / rails_rce.rb
Last active Dec 6, 2019
Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
View rails_rce.rb
#!/usr/bin/env ruby
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
# ## Advisory
# ## Caveats
jamiely /
Created Sep 1, 2012
Generating offline maps for iOS applications


Recently, I had to implement an offline mapping solution for an iOS application. Here's a walkthrough of how to do it.


I generated a tile database using TileMill. I used the Route-Me iOS library which provides a map view that supports offline tile sources.


mbleigh / Gemfile
Created Mar 21, 2012
Non-Rails Rackup with Sprockets, Compass, Handlebars, Coffeescript, and Twitter Bootstrap
View Gemfile
source ""
gem 'sprockets'
gem 'sprockets-sass'
gem 'sass'
gem 'compass'
gem 'bootstrap-sass'
gem 'handlebars_assets'
gem 'coffee-script'
johnrees /
Last active May 29, 2018
Standard Rails 5.* setup for Ubuntu 14.04 LTS
# As root user
sudo su
# Update the OS
sudo apt-get update -y
# Add this to ~/.bashrc to remove timezone warnings
echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc
source ~/.bashrc
mkrogh / fileless_file.rb
Created Mar 3, 2012
Carrierwave proccess zipfile contents
View fileless_file.rb
#A nice little carrierwave IO faker class
class FilelessFile < StringIO
attr_accessor :original_filename
paulirish / rAF.js
Last active Jan 15, 2020
requestAnimationFrame polyfill
View rAF.js
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
dhh / gist:1014971
Created Jun 8, 2011
Use concerns to keep your models manageable
View gist:1014971
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
dhh / gist:966575
Created May 11, 2011
Mailbag feature
View gist:966575
class NotesController < ApplicationController
def create
@note = @project.notes.create params[:note].merge(
creator: current_user, subscribers: extract_subscribers(params[:note]))
@note.subscribers.each { |subscriber| Subscriptions.note(@note, subscriber).deliver }
class Subscriptions < ActionMailer::Base
mattwynne / be_same_file_as.rb
Created Dec 10, 2010
RSpec matcher to compare two file, using their MD5 hashes
View be_same_file_as.rb
RSpec::Matchers.define(:be_same_file_as) do |exected_file_path|
match do |actual_file_path|
md5_hash(actual_file_path).should == md5_hash(exected_file_path)
def md5_hash(file_path)
You can’t perform that action at this time.