Prereqs:
- node and npm
- coffee-script npm package
Install meteor:
curl install.meteor.com | /bin/sh
Clone/copy these files into a directory
Prereqs:
Install meteor:
curl install.meteor.com | /bin/sh
Clone/copy these files into a directory
| # Hello ButtonView (world) | |
| class AppDelegate | |
| def application(application, didFinishLaunchingWithOptions:launchOptions) | |
| @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
| @window.rootViewController = ButtonViewController.alloc.init | |
| @window.makeKeyAndVisible | |
| return true | |
| end | |
| end |
| <html> | |
| <head> | |
| <script type="text/javascript"> | |
| function onFailSoHard() { | |
| console.log("fail") | |
| } | |
| function sendSignalingChannel(message) { | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open('POST', path, true); |
| # Sinatrize | |
| # usage: | |
| # | |
| # mkdir -p yourapp | |
| # cd yourapp | |
| # wget https://gist.githubusercontent.com/makevoid/2385559/raw/1fc0355a04ed2153d74b06386048d1e1541a0706/sinatrize.rb # if you are not sure get the latest gist by clicking on [Raw] | |
| # ruby sinatrize.rb | |
| # rm -f sinatrize.rb | |
| # bundle |
| require 'rack-tidy-ffi' | |
| require 'sinatra' | |
| use RackTidyFFI | |
| class MyApp < Sinatra::Base | |
| get "/" do | |
| "<div>aaaa<div>bbb</div><div>" | |
| end | |
| end |
| #!/usr/bin/env sh | |
| echo "Use current directory as default search scope in Finder" | |
| defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" | |
| echo "Show Path bar in Finder" | |
| defaults write com.apple.finder ShowPathbar -bool true | |
| echo "Disable the Ping sidebar in iTunes" | |
| defaults write com.apple.iTunes disablePingSidebar -bool true |
| #!/bin/sh | |
| # | |
| # nginx - this script starts and stops the nginx daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
| # proxy and IMAP/POP3 proxy server | |
| # processname: nginx | |
| # config: /etc/nginx/nginx.conf | |
| # config: /etc/sysconfig/nginx |
| var settings = { | |
| max_width: 600, | |
| max_height: 200 | |
| } | |
| resize_image = function(img){ | |
| var ctx = canvas.getContext("2d") | |
| var canvasCopy = document.createElement("canvas") | |
| var copyContext = canvasCopy.getContext("2d") |
Example of embedded http://thorrents.com search, and a tribute to Cory Doctorow ;) tnx to @thedod
See it live here.
If you want to embed this (or any other search) in an existing page:
<body/>.query to whatever you want to search (and maybe change limit).| def github(gem) | |
| "git@github.com:datamapper/#{gem}" | |
| end | |
| def gh_gem(gem) | |
| gem gem, git: github(gem) | |
| end | |
| %w(dm-core dm-constraints dm-migrations dm-do-adapter dm-mysql-adapter).each do |g| | |
| gh_gem g |