Skip to content

Instantly share code, notes, and snippets.

View daryllxd's full-sized avatar
👨‍🔬
Do not fear failure but rather fear not trying.

Daryll Santos daryllxd

👨‍🔬
Do not fear failure but rather fear not trying.
View GitHub Profile
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
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'
/*
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;
/*
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;
{"name":{"id":"3","full_name":"Darll2","user_type":"citizen","email":"aryll2@gov.ph"},"allocations":[{"sector":"Social Services","budget_allocation":"97","amount":"942800000","category_id":"1","assignments":[{"full_name":"Health facility","amount":"5","unit":""},{"full_name":"Health worker","amount":"117045","unit":""},{"full_name":"Classroom","amount":"873028","unit":""},{"full_name":"Teacher","amount":"259082","unit":""},{"full_name":"Textbook","amount":"195","unit":""}]},{"sector":"Economic Services","budget_allocation":"96","amount":"990200000","category_id":"2","assignments":[{"full_name":"Road","amount":"12","unit":"per km"},{"full_name":"Seedline","amount":"38","unit":""},{"full_name":"Fist port","amount":"416","unit":""},{"full_name":"Fertilizer","amount":"347","unit":"per sack"},{"full_name":"Livestock","amount":"34","unit":""}]},{"sector":"General Public Services","budget_allocation":"96","amount":"964500000","category_id":"3","assignments":[{"full_name":"Carrier truck","amount":"3","unit":""},{"ful
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
@daryllxd
daryllxd / # openssl - 2016-10-21_20-04-21.txt
Created October 21, 2016 12:06
openssl on macOS 10.8.5 - Homebrew build logs
Homebrew build logs for openssl on macOS 10.8.5
Build date: 2016-10-21 20:04:21
@daryllxd
daryllxd / pre-commit, ruby + rubocop
Last active February 28, 2017 12:47 — forked from adillera/pre-commit
Pre-commit hook. Add this to your .git/hooks to be reminded if you placed a debugger somewhere. Add file types in FILES variable and the forbidden texts in FORBIDDEN
#!/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."
@daryllxd
daryllxd / gist:a1c5886a18b8fa98c93b42be52c938d3
Last active March 21, 2017 07:26
Assignment - MeetLive
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)
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}"