Skip to content

Instantly share code, notes, and snippets.

View sammarcus's full-sized avatar
💭
hi

Sam Marcus sammarcus

💭
hi
View GitHub Profile
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "(0013) Deploy Magento on AWS (New VPC)",
"Parameters": {
"MagentoReleaseMedia": {
"Description": "Amazon S3 path to download magento .tar.gz file (s3://mybucket/magento-1.9.2.2.tar.gz)",
"Default": "",
"Type": "String"
},
"MagentoSampleData": {
Recoverable Error: Argument 1 passed to Magento\Setup\Module\DataSetup::__construct() must be an instance of Magento\Framework\Module\Setup\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /opt/bitnami/apps/magento/htdocs/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 97 and defined in /opt/bitnami/apps/magento/htdocs/setup/src/Magento/Setup/Module/DataSetup.php on line 58
#0 /opt/bitnami/apps/magento/htdocs/setup/src/Magento/Setup/Module/DataSetup.php(58): Magento\Framework\App\ErrorHandler->handler(4096, 'Argument 1 pass...', '/opt/bitnami/ap...', 58, Array)
#1 /opt/bitnami/apps/magento/htdocs/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(97): Magento\Setup\Module\DataSetup->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))
#2 /opt/bitnami/apps/magento/htdocs/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObjec
@sammarcus
sammarcus / tinder-api-documentation.md
Last active August 29, 2015 14:27 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

Note: this was written in April/May 2014 and the API may have changed since

API Details

var flights = $("div:contains('Best flights'):last").parent().children();
if (flights.length === 0) {
flights = $("div:contains('Choose an outbound'):last").parent().parent().children()[1];
flights = $($(flights).children()[0]).children();
}
var avg_time = 0;
var avg_price = 0;
flights.toArray().forEach(function (elm, ind, arr) {
if ($(elm).attr("iti") != undefined) {
class Customer < ActiveRecord::Base
belongs_to :order
validates :name, presence: true,
allow_blank: false,
uniqueness: true
end
# Configuring Our Prompt
# ======================
# if you install git via homebrew, or install the bash autocompletion via homebrew, you get __git_ps1 which you can use in the PS1
# to display the git branch. it's supposedly a bit faster and cleaner than manually parsing through sed. i dont' know if you care
# enough to change it
# This function is called in your prompt to output your active git branch.
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
require "serialport"
class RfidReader
attr_accessor :key
def initialize(port)
port_str = port
baud_rate = 9600
data_bits = 8
stop_bits = 1
parity = SerialPort::NONE
<!DOCTYPE html>
<html>
<head>
<title>Fly-n-Ryde</title>
<link data-turbolinks-track="true" href="/assets/bootstrap.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/bootstrap/bootstrap.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/bootstrap/bootstrap.min.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/destinations.css?body=1" media="all" rel="stylesheet" />
<link data-turbolinks-track="true" href="/assets/font-awesome.min.css?body=1" media="all" rel="stylesheet" />
<div>
http://streeteasy.com/for-rent/nyc/status:open%7Cprice:-2500%7Cbeds%3C=1%7Ccommute:1800:11%20broadway%7Ctransit_distance:0.3%7Ctransit_lines:1,2,3,4,5,6,7,N,Q,R
</div>
class Kid < ActiveRecord::Base
has_one :bucket
has_many :candies, through: :bucket
def pig_out(num)
if num <4
self.feeling = "Happy"
else
self.feeling = "Sick"