Skip to content

Instantly share code, notes, and snippets.

View andrest's full-sized avatar
๐Ÿถ
feeding dogs

Andres Tuul andrest

๐Ÿถ
feeding dogs
  • New York
View GitHub Profile

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
$(document).ready(function() {
$("#demo-input-local-custom-formatters").tokenInput([{
"first_name": "Arthur",
"last_name": "Godfrey",
"email": "[email protected]",
"url": "https://si0.twimg.com/sticky/default_profile_images/default_profile_2_normal.png"
},
{
"first_name": "Adam",
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TeXShop Extended</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<?php
// Licence: Do Whatever The Fuck You Want! http://www.wtfpl.net/about/
// Author: Your bro!
$fbAuth = array("facebook_id" => "123456789", facebook_token" => "<Use charles proxy to do man-in-middle SSL sniffing and extract fb token>");
// Do the magic.
$tinderToken = tinderCall("auth", "token", $fbAuth); // Authenticate
var phidget = require('phidget');
var bridge = new phidget.bridge();
var scale = bridge.attach(function (err) {
console.log('\n0 ----------------\n');
console.log(phidget.getValue(350222, function(data){ console.log(data) }));
console.log('\n1 ----------------\n');
console.log(phidget.getValue(4, function(data){ console.log(data) }));
console.log('\n2 ----------------\n');
console.log(phidget.getValue(-1, function(data){ console.log(data) }));
console.log('\n3 ----------------\n');
var SupplementBox = React.createClass({
render: function() {
var content;
if (this.props.selected_supplement == null || typeof this.props.selected_supplement.master === "undefined") {
content = function(){
return(
<div></div>
)
// This is how it's called
<SubscriptionBuilder handleCartClick={this.props.handleCartClick} cart_workout={ this.state.cart_workout } cart_rest={ this.state.cart_rest }/>
.
.
.
var SubscriptionBuilder = React.createClass({
render: function() {
var cart_items = function(product, index) {
@andrest
andrest / gist:a64649f128af1bd368ee
Created December 15, 2014 09:44
checkout_controller_decorator.rb
Spree::CheckoutController.class_eval do
def before_address
# If the user has a default address, a callback takes care of setting
# that; but if he doesn't, we need to build an empty one here.
# Regardless of checkout steps, build a shipping address
@order.bill_address ||= Spree::Address.build_default
@order.ship_address ||= Spree::Address.build_default
end
@andrest
andrest / creator_widget.js.jsx
Created December 22, 2014 11:47
When route '/creator' is selected and the user clicks on the button (see creator_widget.js.jsx below) he's taken back to '/'. Why and how to prevent this?
var React = require('react');
var CreatorBox = module.exports = React.createClass({
render: function() {
return (
<a href="#" className="btn btn-default" role="button">Button</a>
)
}
})
Andres at and-mbp in ~/Projects/react-router-mega-demo on master
$ ./script/dev
Running node-supervisor with
program 'app.js'
--watch '.'
--extensions 'node,js'
--exec 'node'
Starting child process with 'node app.js'