Skip to content

Instantly share code, notes, and snippets.

View tammersaleh's full-sized avatar

Tammer Saleh tammersaleh

  • coreweave.com
  • California, USA
  • 20:03 (UTC -08:00)
View GitHub Profile
def publish(feed_story_or_action)
session.post(Facebooker::Feed::METHODS[feed_story_or_action.class.name.split(/::/).last], feed_story_or_action.to_params) == "1" ? true : false
end
def post_form_with_net_http(url,params)
Net::HTTP.post_form(url, params)
end
def post_form_with_curl(url,params,multipart=false)
response = Curl::Easy.http_post(url.to_s, *to_curb_params(params)) do |c|
c.multipart_form_post = multipart
c.timeout = Facebooker.timeout
end
response.body_str
def fb_cookie_prefix
Facebooker.api_key+"_"
end
def fb_cookie_names
fb_cookie_names = cookies.keys.select{|k| k.starts_with?(fb_cookie_prefix)}
end
def secure_with_cookies!
parsed = {}
def email_validate_confirmation_required?
(self.email.blank? && !self.email_confirmation.blank?) ||
(!self.email.blank? && !self.email_confirmation.blank?) ||
(!self.email.blank? && self.email_confirmation.blank?)
end
Account Create (0.3ms) INSERT INTO `accounts` (`name`, `updated_at`, `deleted_at`, `pending_deletion`, `full_domain`, `created_at`, `tenant_disabled`) VALUES('Cakes Account', '2009-05-26 11:13:25', NULL, 0, 'cakes.livebarhq.com', '2009-05-26 11:13:25', 0)
POST http://localhost:8080/services/seattle/tenants.json
---
- "{\"username\": \"cakes\", \"domain\": \"cakes.livebarhq.com\", \"first_name\": \"Cakes\", \"password\": \"test\", \"last_name\": \"Admin\", \"email\": \"[email protected]\"}"
- Authentication: f5d06ddb28537e81edcaa1a1f1ca842cba77d6219bba95fbb38a4906750c7d5d0e6301a6c602a918
Content-Type: application/json
--> 201 Created ({"admin_token_value":"c0b701fe7381e1b31a56f130a162bd8b2280d0b985d11ed9fc86507eeb70f6aa83ec45fd9f87c693","anon_token_value":"681e35bcbd3a74a7a34317d98036daa7fdc5840db09c81cb6c325519df0077c5","domain":"cakes.livebarhq.com","email":null,"first_name":null,"id":3,"last_name":null,"password":null,"username":null}b 1.38s)
User Exists (0.5ms) SELECT `users`.id FROM `users` WHE
[tsaleh@tardis:~/code/liveworld-seattle multitenant ∴ ] cat WEB-INF/jiveHome/jive_startup.xml
<defaultProvider>
<username>jive</username>
<serverURL>jdbc:mysql://localhost:3306/everett_multitenant_default</serverURL>
<maxConnections>25</maxConnections>
<connectionTimeout>1.0</connectionTimeout>
<driver>com.mysql.jdbc.Driver</driver>
<password>JumpnJ1v3</password>
<minConnections>5</minConnections>
</defaultProvider>
mysql> show tables;
+---------------------------------------+
| Tables_in_everett_multitenant_default |
+---------------------------------------+
| abuseMessage |
| abuseMessageProp |
| abuseThread |
| abuseThreadProp |
| clubInvitation |
| deletedCategory |
[tsaleh@tardis:~/code/liveworld-seattle multitenant ∴ ] ./clear_cache.sh
* About to connect() to localhost port 8080 (#0)
* Trying ::1... Connection refused
* Trying fe80::1... Connection refused
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /admin/system-cache.jsp HTTP/1.1
> User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
> Host: localhost:8080
> Accept: */*
-- assume_migrated_upto_version(20090410205156)
-> 0.0020s
** Invoke sample_accounts:create (first_time)
** Invoke environment
** Execute sample_accounts:create
Loading data...
** Invoke spec:db:fixtures:load (first_time)
** Invoke environment
** Execute spec:db:fixtures:load
rake aborted!
[tsaleh@tardis:~/code/thoughtbot-hoptoad master] git ql origin/production...HEAD
9da20b57ad4e49c9c92dd943ce686efc7056cd84 191: flatten whitespace in error messages - Joe Ferris
a50b71e86e11f27f184a46f1cd674f1ea686f5ce 307: fixed the free trial period after fixing a failed credit card - Joe Ferris
40f7ff98dc351a71fa39204191712569c2556a8a 354: normalize backtraces in xml output - Joe Ferris
f0e2cc506c742c7fbffe3405d879fec7825f8d6e 307: changed Subscription#remote_update to delete and recreate unpaid subscriptions - Joe Ferris
08ffdf7be9d107f2ddd87f9cc64bcd9610bcdba6 307: added an #unpaid? method to accounts so we can find unpaid accounts based on their receipts - Joe Ferris
efc35750f28a196cae0f1d0b6176e6042ec2d16a 353: fixed deploy dates being formatted incorrectly - Joe Ferris
22a691df8335774a8ea58d482342f53f3829a84e Updated ANNOUNCER (face-melting guitar solo) - Joe Ferris
9ad7a5ddaeeb730d6e3714301a4eca260172c629 Merge branch 'master' of [email protected]:thoughtbot/hoptoad - Tammer Saleh
79e7a42b416af8e649ef189