Skip to content

Instantly share code, notes, and snippets.

View muloka's full-sized avatar
💖
I may be slow to respond.

Muloka muloka

💖
I may be slow to respond.
View GitHub Profile

MOBILE WEB (at 25 minutes)

https://www.growthhacker.tv/jimmy-soni&4205a42e

Jimmy Soni (Managing Editor at the Huffington Post)
@jimmyasoni

  • You'll get a lot more traction as a publisher if you focus on mobile web than if you focus on mobile apps
  • The people that download your app our your hardcore loyalists
  • 80% to 85% of apps are never opened after their first open
def yield_placeholder(name, content = nil, &block)
if content_for?(name)
concat @view_flow.get(name)
else
if block_given?
content = capture(&block)
end
concat content
end
end
<!--
# ([].each {}).empty?
# .each returns the enumerator
# the block itself returns an array
-->
<% if @messages.each do |message| %>
<%# code or partial to display the message %>
<% end.empty? %>
You have no messages.
// NAD27 to NAD83/WSG84 converter
// http://transition.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html
// http://home.hiwaay.net/~taylorc/bookshelf/math-science/geodesy/datum/transform/molodensky/
// http://www.gov.bm/portal/server.pt?open=512&objID=330&&PageID=1460&mode=2&in_hi_userid=2&cached=true
var data = [
{ item: '1', lat: [32,19,45.5], lon: [-64,50,7.8] },
{ item: '2', lat: [32,19,1.6], lon: [-64,50,33.8] },
{ item: '3', lat: [32,18,49.2], lon: [-64,50,31.9] },
{ item: '4', lat: [32,18,10.3], lon: [-64,52,1.5] },
http://www.royalgazette.com/assets/pdf/RG1283231129.pdf
http://www.royalgazette.com/assets/pdf/RG1283221129.pdf
http://www.royalgazette.com/assets/pdf/RG1283191129.pdf
http://www.royalgazette.com/assets/pdf/RG134857410.pdf
http://www.royalgazette.com/assets/pdf/RG1283271129.pdf
http://www.royalgazette.com/assets/pdf/RG81144212.pdf
http://www.royalgazette.com/assets/pdf/RG13618656.pdf
http://www.royalgazette.com/assets/pdf/RG1283211129.pdf
http://www.royalgazette.com/assets/pdf/RG123563823.pdf
http://www.royalgazette.com/assets/pdf/RG121737727.pdf
@muloka
muloka / webapp.rb
Created November 16, 2010 21:41 — forked from igrigorik/webapp.rb
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?)
[200, {}, send(func, *attrs)]
end
# layout_helper.rb
module LayoutHelper
def headjs
["/javascripts/jquery.js","/javascripts/rails.js","/javascripts/application.js"]
end
def headjs_show
"<script type='text/javascript'>
head.js('#{headjs.join('\',\'')}');
</script>"
// An Unobtrusive Javascript (UJS) driver based on explicit behavior definitions. Just
// put a "data-behaviors" attribute on your view elements, and then assign callbacks
// for those named behaviors via Behaviors.add.
var Behaviors = {
add: function(trigger, behavior, handler) {
document.observe(trigger, function(event) {
var element = event.findElement("*[data-behaviors~=" + behavior + "]");
if (element) handler(element, event);
});
@muloka
muloka / Super Simple Chat Server
Created January 17, 2011 20:46
Taken from Introduction to Node: Ryan Dahl
// source: http://camp.nodejs.org/videos/session-01_introduction_to_node-ryan_dahl.html
// Handles TCP connections
net = require('net');
// define global variables
people = []
// create tcp server
s = net.createServer(function(socket) {
@muloka
muloka / gist:809637
Created February 3, 2011 15:41
Reducing Friction by Chris Wanstrath
"...if there's one thing I've learned from Rails, it's to get the hell out of
the way and let people focus on the task at hand.
Reduce friction.
Newton's first law of motion, as commonly written, makes two statements: an
object at rest tends to stay at rest and an object in motion tends to stay in
motion. It's often referred to as the Law of Inertia.
And inertia, for those who don't remember or didn't take high school physics,