This file contains 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
cd /tmp | |
git clone git@github.com:zeromq/zeromq4-x.git | |
cd zeromq4-x | |
./autogen.sh | |
./configure | |
make | |
make install | |
This file contains 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 | |
// Parsing this spreadsheet: https://spreadsheets.google.com/pub?key=0Ah0xU81penP1dFNLWk5YMW41dkcwa1JNQXk3YUJoOXc&hl=en&output=html | |
$url = 'http://spreadsheets.google.com/feeds/list/0Ah0xU81penP1dFNLWk5YMW41dkcwa1JNQXk3YUJoOXc/od6/public/values?alt=json'; | |
$file= file_get_contents($url); | |
$json = json_decode($file); | |
$rows = $json->{'feed'}->{'entry'}; | |
foreach($rows as $row) { | |
echo '<p>'; |
This file contains 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
## Contribution leaderboard | |
# | |
# Get a leaderboard of contributions in your org | |
# | |
# usage: $ USERNAME=yourusername PASSWORD=yourpassword ORG=yourorgname ruby leaderboard.rb | |
# | |
# n.b requires the octokit and mechanize gems | |
require 'rubygems' | |
require 'octokit' |
This file contains 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 ffmepg (for the screencast) & imagemagick (to optimize the GIF file for web usage) | |
brew install ffmpeg | |
brew install imagemagick | |
# Make the screencast and compress it | |
ffmpeg -i ScreenFlow.mov -pix_fmt rgb24 output.gif | |
convert -layers Optimize output.gif output_optimized.gif | |
# Upload it somewere in the cloud... | |
# ... and use the file in the desire website. Here's the markdown syntax: |
This file contains 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
--- | |
# Attempt to check if the folder exist. | |
# If it exist echo out a string. You have to echo something | |
# if the directory does exist or else the task is considered failed | |
# Output is set to $is_default_created. Note that this variable is | |
# object and not an atomic value. | |
- name: Attempt to check if a directory exist | |
action: shell test -d /my/folder && echo "exist" || echo "" | |
register: is_folder_created |
This file contains 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
ssh-copy-id pi@192.168.X.X | |
# on the pi | |
sudo su - | |
cat <<EOF >> /etc/wpa_supplicant/wpa_supplicant.conf | |
network={ | |
ssid="Your SSID Here" | |
proto=RSN | |
key_mgmt=WPA-PSK | |
pairwise=CCMP |
This file contains 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 | |
/** | |
* @BeforeScenario | |
*/ | |
public function captureConsoleLog() { | |
if (!($this->getSession()->getDriver() instanceof \Behat\Mink\Driver\Selenium2Driver)) { | |
// Not a Selenium driver (e.g. PhantomJs). | |
return; | |
} |
This file contains 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 | |
class evidenceController { | |
public function getDetails($id){ | |
$course = Course::with(['courseType']) | |
->checkEstablishmentOnView() | |
->excludeArchived() | |
->findOrFail($id); | |
$view = View::make('courses/parts/details') | |
->with('course', $course); |
This file contains 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
#!/bin/sh | |
sudo apt-get update | |
sudo apt-get install openjdk-6-jre | |
sudo apt-get install openjdk-6-jdk | |
sudo wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
sudo apt-get update | |
sudo apt-get install jenkins | |
sudo apt-get install ant |
This file contains 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
// Create the test | |
var pixelRatio = (window.devicePixelRatio >= 1.5) ? "high" : "normal"; | |
.. | |
// Pass it along through GA | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-xxxxxxxx-x']); | |
// --- IMPORTANT LINE! | |
// params: event method, custom variable slot, variable name, variable value, scope level |
OlderNewer