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
| #!/bin/sh | |
| set -o errexit | |
| set -e | |
| # Fail fast if we're not on OS X >= 10.6.0. | |
| if [ "$(uname -s)" != "Darwin" ]; then | |
| echo "Sorry, DevDNS requires Mac OS X to run." >&2 | |
| exit 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
| { | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
| "detect_slow_plugins": false, | |
| "file_exclude_patterns": | |
| [ | |
| "*.log", | |
| "*.gif", | |
| "*.png", | |
| "*.jpg", | |
| "*.psd", |
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
| [ | |
| { "keys": ["ctrl+shift+t"], "command": "delete_trailing_spaces" }, | |
| { "keys": ["ctrl+space"], "command": "exit_insert_mode", | |
| "context": | |
| [ | |
| { "key": "setting.command_mode", "operand": false }, | |
| { "key": "setting.is_widget", "operand": false } | |
| ] | |
| }, |
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
| def payment_received(user.id, amount) | |
| mixpanel.people.track_charge(user.id, amount, {}, nil, '$ignore_time' => true) | |
| mixpanel.track(user.id, 'Payment', 'Action' => 'received', 'Amount' => amount) | |
| end | |
| def payment_refunded(user, amount) | |
| mixpanel.people.track_charge(user.id, -amount, {}, nil, '$ignore_time' => true) | |
| mixpanel.track(user.id, 'Payment', 'Action' => 'refunded', 'Amount' => -amount) | |
| 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
| def mixpanel | |
| @mixpanel ||= Mixpanel::Tracker.new(MIXPANEL[:token]) | |
| end | |
| def user_conversion(user, converted_at = Time.now.in_time_zone('UTC')) | |
| properties = { | |
| 'Converted' => converted_at, | |
| 'Conversion Delay' => (converted_at.to_date - user.created_at.to_date).to_i | |
| } | |
| mixpanel.people.set_once(user.id, properties, nil, '$ignore_time' => true) |
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
| mixpanel.people.set(user_id, properties, nil, '$ignore_time' => true) | |
| mixpanel.people.set_once(user_id, properties, nil, '$ignore_time' => true) | |
| mixpanel.people.unset(user_id, property, nil, '$ignore_time' => true) | |
| mixpanel.people.increment(user_id, { property => value }, nil, '$ignore_time' => true) | |
| mixpanel.people.track_charge(user_id, amount, {}, nil, '$ignore_time' => true) |
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
| # Usage: | |
| # <div "ng-repeat"="comment in comments"> | |
| # <a class="remove" href="" "pj-confirm"="Really remove?" "popover-placement"="left" | |
| # "on-confirm"="deleteComment" "callback-argument"="comment" "confirm-btn-label"="Yes" "cancel-btn-label"="No">Delete</a> | |
| # </div> | |
| # | |
| # Dependencies: | |
| # jQuery UI (for position function) | |
| # Bootstrap CSS |
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
| After adding pubsub (using Pubnub.com) to our application, our headless specs were straight up breaking. Solved by creating a mock that we can trigger within the specs | |
| Coffeescript required by application.js manifest: | |
| class PubsubMock | |
| subscribe: (obj) -> | |
| @channels ||= {} | |
| @channels[obj.channel] ||= [] | |
| @channels[obj.channel].push(obj.message) | |
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
| <% if current_user -%> | |
| <script> | |
| mixpanel.identify('<%= @current_user.id %>'); | |
| mixpanel.register(<%= raw JSON.generate(MixHelp.user_supers(@current_user, 'event')) %>); | |
| mixpanel.name_tag('<%= @current_user.display_name %>'); | |
| mixpanel.people.set(<%= raw JSON.generate(MixHelp.user_supers(@current_user, 'people')) %>); | |
| </script> | |
| <% 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
| class ImageWidget < ContentWidget | |
| has_attached_file :image, | |
| :styles => lambda { |a| | |
| { :thumb => '200x100>', | |
| :display => "#{a.instance.width}x#{a.instance.height}#" } | |
| }, | |
| :storage => PAPERCLIP_CONFIG[:storage], | |
| :bucket => PAPERCLIP_CONFIG[:bucket], | |
| :s3_host_alias => PAPERCLIP_CONFIG[:bucket], |
OlderNewer