Skip to content

Instantly share code, notes, and snippets.

View aaronschachter's full-sized avatar

Aaron Schachter aaronschachter

  • San Francisco, CA
View GitHub Profile
@aaronschachter
aaronschachter / campaignDetail
Created June 10, 2015 03:44
Fuck That Noise
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 3;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
NSString *header = nil;
switch (section) {
case 1:
header = @"Fuck that noise";
@aaronschachter
aaronschachter / notes
Last active August 29, 2015 14:16
Namepuzzle notes
DisplayPuzzle:(NSString *)text asInteractive:(BOOL)isInteractive
* displays each character as a Piece except spaces are rendered as horizontal space, not Pieces. display is centered
if isInteractive:
* create Slots
* add PanGesture to each Piece
====
Warning: Invalid argument supplied for foreach() in dosomething_helpers_preprocess_partners_vars() (line 88 of /var/www/beta.dosomething.org/releases/20141209142557/lib/modules/dosomething/dosomething_helpers/dosomething_helpers.theme.inc).
Warning: Invalid argument supplied for foreach() in dosomething_helpers_format_partners_list() (line 127 of /var/www/beta.dosomething.org/releases/20141209142557/lib/modules/dosomething/dosomething_helpers/dosomething_helpers.theme.inc).
UIImageView
UIPanGestureRecognizer (swipe, pinch, tap, pan = dragging)
tolerance for where to put it in the container
when the pan finishes, is it within 10 points of where i need to be. if so, snap it to there.
=====
UIView (like a div in HTML)
@aaronschachter
aaronschachter / gist:9606caa12265366e1f71
Created November 28, 2014 22:09
Converting system paths to custom/contrib paths
UPDATE system
SET filename = REPLACE(filename, 'sites/all/modules/', 'sites/all/modules/contrib/')
WHERE status = 1
AND filename LIKE 'sites/all/modules%'
UPDATE system
SET filename = REPLACE(filename, 'sites/all/themes/', 'sites/all/themes/contrib/')
WHERE status = 1
AND filename LIKE 'sites/all/themes%'
@aaronschachter
aaronschachter / gist:a2c287e8b142fa0737c1
Last active August 29, 2015 14:02
Removing SMS Game view mode
  • Action Guide
  • Campaign
  • Campaign Group
  • Campaign Run
  • Fact
  • Fact Page
  • Home
  • Image
  • Static content

All of the consumers live on the Rabbit Server.

  • Drupal Producer. is the message broker producer module.
  • App server: One producer (or two) needed be to external facing, so they live on an app server. Mostly for Mailchimp unsubscribes. The rest of the producers live on the Rabbit server at /opt/rabbit

Make sure you have an update to build. Either pull from stage or run ds build.

  1. Install Rabbit

If you have brew installed, http://www.rabbitmq.com/install-homebrew.html

Follow the steps for installing, adding to your .bash_profile and then you can run

rabbitmq-server

@aaronschachter
aaronschachter / gist:9291760
Last active August 29, 2015 13:56
Partners funtime
Deleted field_partners field
Cleared cache
SELECT *
FROM field_collection_item
WHERE field_name='field_partners'
52 rows
SELECT * FROM field_collection_item_revision rev
JOIN field_collection_item item on item.item_id = rev.item_id