View rubocop.rb
#!/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']
View hehe.exs
fizzbuzz = fn (a, b, c) ->
case { a, b, c } do
{ 0, 0, _ } -> "fizzbuzz"
{ 0, _, _ } -> "fizz"
{ _, 0, _ } -> "buzz"
_ -> c
end
end
rem_fiz = fn(num) ->
View gist:e4e420f3f8a967955ae070878cd82fcc
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}"
View gist:a1c5886a18b8fa98c93b42be52c938d3
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)
View pre-commit, ruby + rubocop
#!/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."
View # openssl - 2016-10-21_20-04-21.txt
Homebrew build logs for openssl on macOS 10.8.5
Build date: 2016-10-21 20:04:21
View gist:917634aa7ae0a6775038b43eef66a0b8
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
View gist:e7aeb1c13727f32007b8
/*
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;
View gist:983163f2692557c5ae8b
/*
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;
View github.rb
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'