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 Proxy | |
attr_accessor :messages | |
def initialize(target_object) | |
@object = target_object | |
@messages = [] | |
end | |
def method_missing(method_name, *args, &block) | |
@messages.push method_name | |
@object.send(method_name, *args, &block) | |
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
def generate_tokens(code) | |
data = { | |
client_id: client_id, | |
client_secret: client_secret, | |
redirect_uri: callback_url, | |
code: code | |
} | |
response = connection.post do |request| | |
request.url '/login/oauth/access_token' |
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
/* | |
Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
This example code is in the public domain. | |
*/ | |
// Pin 13 has an LED connected on most Arduino boards. | |
// give it a name: | |
int led = 13; |
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
/* | |
Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
This example code is in the public domain. | |
*/ | |
// Pin 13 has an LED connected on most Arduino boards. | |
// give it a name: | |
int led = 13; |
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
Printing is a process for reproducing text and images using a master form or template. The earliest examples include Cylinder seals and other objects such as the Cyrus Cylinder and the Cylinders of Nabonidus. The earliest known form of woodblock printing came from China dating to before 220 A.D.[1] Later developments in printing include the movable type, first developed by Bi Sheng in China.[2] Johannes Gutenberg introduced mechanical movable type printing to Europe in the 15th century. His printing press played a key role in the development of the Renaissance, Reformation, the Age of Enlightenment, and the scientific revolution and laid the material basis for the modern knowledge-based economy and the spread of learning to the masses.[3] Modern large-scale printing is typically done using a printing press, while small-scale printing is done free-form with a digital printer. Though paper is the most common material, it is also frequently done on metals, plastics, cloth and composite materials. On paper it is |
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
#!/usr/bin/env ruby | |
require 'english' | |
require 'rubocop' | |
cached_changes = `git diff --cached` | |
forbidden_words = ['binding.pry', 'console.log', 'debugger', 'byebug', '!important'] | |
if forbidden_words.any? { |word| cached_changes.include?(word) } | |
puts "Looks like you are trying to commit something (any one of `#{forbidden_words.join(', ')}`) you shouldn't. Please fix your diff, or run 'git commit --no-verify' to skip this check, if you must." |
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
App Name: MeetLive | |
- Use database: MySQL | |
- Use CSS Framework: Bootstrap | |
- View to see all users (/users) | |
- Individual user view- must see interests (/users/:user_id/) | |
- Must be able to create User (through JSON) | |
- Must be able to update User attributes (through JSON) | |
- User must be able to add Interests (through JSON) | |
- User must be able to delete Interests (through JSON) |
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
HaybaDesu -- AirBnb clone | |
Purely back-end app, JSON only. | |
- 1st Part -- Hosts/adding properties | |
- Hosts Table - Email, Password, FirstName, LastName, Location, ImageUrl | |
- Host has_many Accomodations | |
- Accomodations Table - Name, Location, Description, Status (Unbooked or Occupied) | |
- An Accomodation has_many AccomodationPhotos | |
- AccomodationPhotos Table - ImageUrl (required), Caption (not required, but if none was generated, save as "Caption#{AccomodationPhoto.Id}" |
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
fizzbuzz = fn (a, b, c) -> | |
case { a, b, c } do | |
{ 0, 0, _ } -> "fizzbuzz" | |
{ 0, _, _ } -> "fizz" | |
{ _, 0, _ } -> "buzz" | |
_ -> c | |
end | |
end | |
rem_fiz = fn(num) -> |
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
#!/usr/bin/env ruby | |
require 'english' | |
require 'rubocop' | |
require 'rb-readline' | |
require 'pry' | |
cached_changes = `git diff --cached` | |
forbidden_words = ['binding.pry', 'console.log', 'debugger', 'byebug', '!important'] |
OlderNewer