$ rails g model User
belongs_to
has_one
import reddit, getpass | |
if __name__ == "__main__": | |
r = reddit.Reddit(user_agent="test") | |
user_name = raw_input("User name: ") | |
password = getpass.getpass("Password: ") | |
r.login(user=user_name,password=password) | |
saved_links = r.get_saved_links() | |
for link in saved_links: | |
print "Title: " + link.title |
# Edit: Changes inspired by comments from HN users jules and anthonyb | |
import os | |
for i in range(1,20): | |
os.system("wget http://s3.amazonaws.com/bearwithclaws.baconfile.com/hackermonthly-issue%03d.zip" % i) |
$gutter: 10px; | |
$grid-unit: 60px; | |
%clearfix { | |
*zoom: 1; | |
&:after { | |
content: "\0020"; | |
display: block; | |
height: 0; | |
clear: both; |
# Add this config | |
$ heroku config:add LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib | |
# Login to Heroku CLI | |
$ heroku run bash | |
# The second argument here is the path to your script | |
~ $ ~/php/bin/php -f ~/www/index.php |
##References
##Create Rails App
command to make new directory:
mkdir AppName
http://guides.rubyonrails.org/migrations.html
Omniauth Facebook Error - Faraday::Error::ConnectionFailed | |
Faraday::Error::ConnectionFailed | |
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed | |
Rails.application.config.middleware.use OmniAuth::Builder do | |
provider :facebook, '<key from fb>', '<another key from fb>' | |
end | |
class SessionsController < ApplicationController | |
def create |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
Copyright (c) 2010-2015 Giulia Alfonsi <[email protected]> | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the | |
Software is furnished to do so, subject to the following | |
conditions: |