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
| cp /usr/local/Cellar/mongodb/1.6.5-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents | |
| launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist | |
| Then reboot login and | |
| ps -e | grep mongo | |
| nothing |
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
| #This method defines a set of rules and a syntax | |
| #to add then then checks all of the rules | |
| def fizzbuzz(num, rules) | |
| output_str="" | |
| rules.each do |hash| | |
| if num.remainder(hash[:number]).zero? | |
| output_str << hash[:inserted_text] | |
| 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
| require 'sinatra' | |
| require 'haml' | |
| require 'digest/sha1' | |
| require 'rack-flash' | |
| require 'mongoid' | |
| require 'sinatra-authentication' | |
| use Rack::Session::Cookie, :secret => 'skey' | |
| use Rack::Flash |
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
| ---snip | |
| <!-- | |
| Product view | |
| --> | |
| <catalog_product_view translate="label"> | |
| <label>Catalog Product View (Any)</label> | |
| <!-- Mage_Catalog --> | |
| <reference name="root"> |
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
| <?php | |
| /* | |
| Plugin Name: Awesome Twitter Plugin | |
| Plugin URI: | |
| Description: Adds a function to grab your latest tweets and caches them in the database. | |
| Author: Patrick Arlt | |
| Version: 0.01 | |
| Author URI: http://patrickarlt.com | |
| */ |
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
| <!-- Error in a form field add class error to the field and insert--> | |
| <div class="field error"> | |
| <label> | |
| Name | |
| <input name="application[name]" type="text" placeholder="My Cool App" size="20" maxlength="20" value="<%= h @application['name'] %>"> | |
| <small> Required. The name of your application.</small> | |
| </label> | |
| <em class="error">This field is required.</em> | |
| </div> |
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
| var socketio_connect = "http://subscribe.geoloqi.com:80"; | |
| var thePath = false; | |
| function start_realtime_streaming() { | |
| // Load up the history of the trip prior to this page loading | |
| $.getJSON("/platform/share/history.json", { | |
| token: share_token | |
| }, function(data){ | |
| var historyLine = new google.maps.Polyline({ | |
| strokeColor: "#000000", |
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
| mapQuest = new L.TileLayer("http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png", { | |
| maxZoom: 18, | |
| subdomains: ['otile1','otile2','otile3','otile4'] | |
| }); | |
| mapBox = new L.TileLayer("http://{s}.tiles.mapbox.com/v3/mapbox.mapbox-streets/{z}/{x}/{y}.png", { | |
| maxZoom: 18, | |
| subdomains: ['a','b','c','d'] | |
| }); |
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
| var radiusOfEarth = 6378100.0; | |
| function deg2rad(deg) { | |
| return deg * (Math.PI / 180); | |
| } | |
| function rad2deg(rad) { | |
| return rad * (180 / Math.PI); | |
| } |
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
| map.on("popupopen", function(e){ | |
| date = new Date(parseint($("#timeago").html())); | |
| $('#timeago').text($.timeago(date)); | |
| }); |
OlderNewer