Skip to content

Instantly share code, notes, and snippets.

View mrpollo's full-sized avatar
Journey before destination

Ramon Roche mrpollo

Journey before destination
  • Tijuana, Baja California, Mexico
  • 23:26 (UTC -07:00)
  • X @mrpollo
View GitHub Profile
@tpope
tpope / css.vim
Created January 2, 2011 05:42
Nikolai's fix to nested closing curly brace indenting
" Vim indent file
" Language: CSS
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-12-22
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
@stefanfoulis
stefanfoulis / osx_developer_installation.rst
Last active July 10, 2024 14:36
Instructions on how to setup an OSX developer machine for (python/django) development

OSX Developer System installation

This guide assumes a fresh install of Mac OSX 10.7 Lion.

Brew User

@lwe
lwe / unscoped.rb
Created June 13, 2012 10:37
Module which provides the ability to unscope associations
# Provides the ability to unscope associations, this solves problems described in
# http://stackoverflow.com/questions/1540645/how-to-disable-default-scope-for-a-belongs-to/11012633#11012633
#
# Examples
#
# class Document < ActiveRecord::Base
# default_scope where(deleted: false)
# end
#
# class Comment < ActiveRecord::Base
@geermc4
geermc4 / railslog.vim
Created March 5, 2013 21:50
work in progress, colors for a rails production log
" Vim syntax file
" Language: railslog
" Maintainer: German Garcia <geermc4@gmail.com>
" Last Change: 5 March 2013
if exists("b:current_syntax")
finish
endif
syn match controller "Processing by.*"
@geermc4
geermc4 / usps.rb
Created March 6, 2013 00:16
usps debug
o=Spree::Order.find_by_number("R672076841")
object=o
#'USPS Priority Mail' on my db
@carrier=Spree::ShippingMethod.find(16).calculator.carrier
if object.is_a?(Array)
order = object.first.order
elsif object.is_a?(Spree::Shipment)
order = object.order
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@rterbush
rterbush / shipment_state_decorator.rb
Last active December 16, 2015 02:49
Add states to Spree::Shipment model
Spree::Shipment.class_eval do
scope :sent, -> { with_state('sent') }
scope :confirmed, -> { with_state('confirmed') }
Spree::Shipment.state_machines[:state] =
StateMachine::Machine.new(Spree::Shipment, initial: :pending, use_transactions: false) do
event :ready do
transition from: :pending, to: :ready, if: lambda { |shipment|
@takeshixx
takeshixx / hb-test.py
Last active July 4, 2024 03:29
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser