Skip to content

Instantly share code, notes, and snippets.

View binyamindavid's full-sized avatar
🏠
Working from home

Oster binyamindavid

🏠
Working from home
View GitHub Profile
@stefanneculai
stefanneculai / AWS_CONFIG.rb
Last active June 26, 2019 05:29
Amazon Signature Ruby
AWS_CONFIG = {
'access_key_id' => YOUR_ACCESS_KEY,
'secret_access_key' => YOUR_SECRET_ACCESS_KEY,
'bucket' => 'froala',
'acl' => 'public-read',
'key_start' => 'uploads/',
'region' => 's3' # For other regions than us-east-1, use s3-region. E.g.: s3-eu-west-1
}
@emad-elsaid
emad-elsaid / weather.rb
Created February 21, 2014 14:53
get wheather of any city using ruby
require 'open-uri'
require 'json'
require 'psych'
city = 'portsaid,egypt'
request = "http://api.openweathermap.org/data/2.5/weather?q=#{city}"
response = open(request).readlines.join
print Psych.dump( JSON.parse(response) )
=render @memory_page.approved_comments
= simple_form_for [@memory_page, Comment.new], html: {class: 'form-inline'} do |f|
.form-inputs
.row
.col-md-12
= f.input :comment, label: "Add Your Comment", input_html: {class: 'editable'}
.row#hidden_form_elements.hide //I have some JS callback that will display these fields once the parent input has been edited
.col-md-6
= f.input :name
.col-md-6
@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………