This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.cpp | |
// homography | |
// | |
// Created by Gaston on 1/17/13. | |
// | |
// | |
#ifndef HOMO | |
#define HOMO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var App = React.createClass({ | |
userTr: function(user){ | |
var success = function(res){this.setState(res)}; | |
var updateUserWith() = function(){ | |
return function(value){ | |
$.ajax('/users/'+user.id, {property: value}, sucess); | |
}; | |
} | |
return ( | |
<Reactable.Tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fontastic.*; | |
import krister.Ess.*; | |
int bufferSize; | |
int steps; | |
float limitDiff; | |
int numAverages=32; | |
float myDamp=.1f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomDeviseMailer < Devise::Mailer | |
def self.deliver_welcome_email(user) | |
self.welcome_email(user) | |
end | |
def welcome_email(user) | |
@user = user | |
# if the email's ID is 1 | |
@welcome_email = Email.find_by_id(1) | |
mail(to: @user.email, subject: "Welcome to The Pigeonhole!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on gaston-13-13 > ~/dev/pigeonhole/pigeonhole-ios (master)*$ rake frank | |
`sugarcube-uikit' has been renamed to (platform agnostic) `sugarcube-ui' | |
WARNING! BubbleWrap::HTTP is deprecated and will be removed, see https://github.com/rubymotion/BubbleWrap/issues/308 | |
WARNING! Switch to a different networking library soon - consider AFNetworking: http://afnetworking.com/ | |
WARNING! You can use the 'bubble-wrap-http' gem if you need compatibility: https://github.com/rubymotion/BubbleWrap-HTTP | |
Build ./build/iPhoneSimulator-7.0-Development | |
Build /Users/gaston/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/frank-cucumber-1.2.2/frank-skeleton | |
Build ./Pods.xcodeproj [AFNetworking - Release] | |
Build ./Pods.xcodeproj [Bolts - Release] | |
Build ./Pods.xcodeproj [SDK - Release] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////// Creating the Font ////////////////////////////////// | |
// import the library | |
import fontastic.*; | |
// create a new Fontastic font called "10PRINT" | |
Fontastic f = new Fontastic(this, "10PRINT"); | |
// we can set a version | |
f.setVersion("1.0"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.paperclip_defaults = { | |
:storage => :fog, | |
:fog_credentials => {:provider => "Local", :local_root => "#{Rails.root}/public"}, | |
:fog_directory => "/public", | |
:fog_host => 'localhost:3000' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def facebook_account | |
u = self.user | |
link = "https://facebook.com/#{u.facebook}" | |
ActionController::Base.helpers.link_to("<i class='fa fa-facebook'></i>".html_safe, link, target: "_blank", class: "social-solo facebook") if (!(u.nil?) && !(u.facebook.nil?) && !(u.facebook.empty?) && u.show_facebook?) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
form do |f| | |
f.semantic_errors *f.object.errors.keys | |
f.inputs "Details", :class => "collapsible" do | |
f.input :title | |
f.input :author, :label => "Name" | |
f.input :is_private | |
f.input :publish_date, :as => :datepicker | |
f.input :publish_frequency, :as => :number, :label => "Publish Frequency", :step => 1 | |
#TODO: add slug again. Also, understand why this was removed | |
f.input :slug, :placeholder => "cannot be changed afterwards" unless !f.object.slug.nil? |