We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| #!/usr/bin/env python2 | |
| """ | |
| Author: takeshix <[email protected]> | |
| PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]). | |
| Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP. | |
| """ | |
| import sys,struct,socket | |
| from argparse import ArgumentParser |
| 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| |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| 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 |
| " Vim syntax file | |
| " Language: railslog | |
| " Maintainer: German Garcia <[email protected]> | |
| " Last Change: 5 March 2013 | |
| if exists("b:current_syntax") | |
| finish | |
| endif | |
| syn match controller "Processing by.*" |
| # 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 |
| " Vim indent file | |
| " Language: CSS | |
| " Maintainer: Nikolai Weibull <[email protected]> | |
| " Latest Revision: 2010-12-22 | |
| if exists("b:did_indent") | |
| finish | |
| endif | |
| let b:did_indent = 1 |