This is a fairly common question, and there isn't a One True Answer.
These are the most common techniques:
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
<html> | |
<head> | |
<script type="text/javascript" src="LAB.js"></script> | |
<script type="text/javascript"> | |
var _queue = ["script1.js",null], $L = $LAB; | |
</script> | |
... | |
</head> | |
<body> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>LABjs Demo</title> | |
<script src="/js/queue.LAB.js"></script> | |
<script> | |
// adding `false` in the queue will signifiy an empty .wait() in the $LAB chain | |
$LAB.queue("http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js", false); | |
$LAB.queue("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js", false); |
/* Dynamically create a page and navigate to it. | |
(and include the page in browser history ) */ | |
//create markup | |
var newPage = $("<div data-role=page data-url=yay><div data-role=header><h1>YAY!!!!</h1></div><div data-role=content><img src=http://bukk.it/yay.gif /></div></div"); | |
//append it to the page container | |
newPage.appendTo( $.mobile.pageContainer ); | |
//go to it |
namespace.views.MyWizard = Backbone.Views.extend({ | |
initialize: function() { | |
_.bindAll(this, 'render', 'wizardMethod'); | |
} | |
render: function() { | |
this.wizardMethod(); | |
return this; | |
}, |
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk.i686 -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
name = Problem solver | |
description = The module that will solve all your drupal problems | |
package = Problems | |
version = 1.x | |
core = 7.x |