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
| javascript:(function(){ | |
| var images = document.getElementsByTagName("img"); | |
| var id_regex = new RegExp(/^thumb-img\d+/i); | |
| var image_source_regex = new RegExp(/(.+?)t(.\w{3})$/); | |
| var image_sources = []; | |
| for (var i = 0; i < images.length; i++) { | |
| if (id_regex.test(images[i].id) && image_source_regex.test(images[i].src)) { | |
| image_source = RegExp.$1 + RegExp.$2; | |
| image_sources.push(image_source); | |
| } |
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
| /* global YUI */ | |
| /** | |
| * My Module's purpose | |
| * @module my-module | |
| * @requires base-build, widget | |
| */ | |
| YUI.add("my-module", function (Y) { | |
| "use strict"; |
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
| <script> | |
| var YUI_config = { | |
| skin : { | |
| overrides : { | |
| "widget" : [] | |
| } | |
| } | |
| }; | |
| </script> |
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
| # 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 |
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 'optparse' | |
| require 'ostruct' | |
| require 'pp' | |
| # Default settings | |
| options = OpenStruct.new :file => '', :from => nil, :to => nil, :include_referrer => false | |
| OptionParser.new do |opts| | |
| opts.banner = """ |
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
| VERSION=0.90.1 | |
| sudo apt-get update | |
| sudo apt-get install openjdk-6-jdk | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$VERSION.deb | |
| sudo dpkg -i elasticsearch-$VERSION.deb | |
| # be sure you add "action.disable_delete_all_indices" : true to the config!! |
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
| # as root | |
| echo -e "\ndeb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.list | |
| wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | |
| apt-key add rabbitmq-signing-key-public.asc | |
| apt-get update |
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
| # Install rabbitmq | |
| wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo | |
| yum install erlang | |
| rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | |
| rpm -Uvh http://www.rabbitmq.com/releases/rabbitmq-server/v3.2.3/rabbitmq-server-3.2.3-1.noarch.rpm |
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
| [elasticsearch-1.0] | |
| name=Elasticsearch repository for 1.0.x packages | |
| baseurl=http://packages.elasticsearch.org/elasticsearch/1.0/centos | |
| gpgcheck=1 | |
| gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch | |
| enabled=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
| final SurfaceView sv = (SurfaceView) findViewById(R.id.splash_surface); | |
| MediaPlayer mp = new MediaPlayer(); | |
| mp.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { | |
| @TargetApi(Build.VERSION_CODES.JELLY_BEAN) | |
| @Override | |
| public void onPrepared(MediaPlayer mp) { | |
| mp.setVideoScalingMode(MediaPlayer.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING); | |
| mp.setDisplay(sv.getHolder()); | |
| mp.start(); |