This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert("Your csp didnt work"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rvm osx-ssl-certs update all | |
brew install openssl | |
brew link openssl --force | |
<RESTART YOUR CONSOLE> | |
<If it worked a run of `which openssl` should return /usr/local/bin/openssl> | |
rvm install ruby-2.2.2 --disable-binary | |
Then reinstall your gems w/ the new ruby and you should be ok. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am joshreedschramm on github. | |
* I am joshreedschramm (https://keybase.io/joshreedschramm) on keybase. | |
* I have a public key whose fingerprint is C487 2D4B DF7B 1769 8C79 273E 2EBB 3A18 7892 0B82 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In registrations controller add a private method | |
private | |
def default_data_from_social | |
defaults = {:user => {}, :identity => {}} | |
if session["devise.google_data"] | |
user_data = session["devise.google_data"] | |
@service = "Google" | |
elsif session["devise.facebook_data"] | |
user_data = session["devise.facebook_data"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= f.collection_check_boxes :venue_ids, Venue.all, :id, :name, checked: Venue.all.map(&:id) do |b| %> | |
<span> | |
<%= b.check_box %> | |
<%= b.label %> | |
</span> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have a pretty complicated query. It looks like this - | |
db.articles.find({"online_product_id": ObjectId("4e8910b27fd0dc66ef000006"), "draft": { "$ne":true }, "approval_status":"approved", "publish_time": { "$lte":ISODate("2013-10-24T16:45:35.000Z")}, "$or": [{"section":{"$in":["weekender"]}}, {"labels.identifier":{"$in":["weekender", "news local"]}}]}).sort({"publish_time":-1,"rank":1}).hint("article_lookup") | |
running that on my 2million record articles collection takes about 2 seconds. I added the following index: | |
{ | |
"v" : 1, | |
"key" : { | |
"online_product_id" : 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How you could do what you want in Ember | |
App.Router.map(function(){ | |
this.resource("userSession", function(){ | |
this.route("new", { path: "/sign-in" }); | |
}) | |
}); | |
// However, any time you create a resource you have an extra layer of routing | |
// & a model that you may/may not want. In the case of sign-in, which doesn't |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* So I didn't really address the naming piece, but I'd start by going down this route */ | |
public class Task : ActiveRecord | |
{ | |
public string Name { get; set; } | |
public int AssignedTo_UserId { get; set; } | |
public DateTime DueOn { get; set; } | |
private INotifier _notifier; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://wordpress.org/support/topic/limit-search-results-to-custom-post-type | |
http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress | |
http://www.makeuseof.com/tag/working-custom-database-tables-wordpress/ | |
http://thinkvitamin.com/code/create-your-first-wordpress-custom-post-type/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl http://twitter.com/search.json?q=%23burningriverdevs | grep -Po '"text":.*?[^\\]",' | sed -e 's/\"text\"://g' | sed -e 's/@burningriverdev//g' | sed -e 's/#burningriverdevs/burning\ river\ devs/g'| sed -e 's/RT\ ://g' | sed -e 's/\\\u201C//g' | say |
NewerOlder