As configured in my dotfiles.
start new:
tmux
start new with session name:
brew update | |
brew versions FORMULA | |
cd `brew --prefix` | |
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
brew install FORMULA | |
brew switch FORMULA VERSION | |
git checkout -- Library/Formula/FORMULA.rb # reset formula | |
## Example: Using Subversion 1.6.17 | |
# |
As configured in my dotfiles.
start new:
tmux
start new with session name:
app.filter('bytes', function() { | |
return function(bytes, precision) { | |
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; | |
if (typeof precision === 'undefined') precision = 1; | |
var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], | |
number = Math.floor(Math.log(bytes) / Math.log(1024)); | |
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; | |
} | |
}); |
<?php | |
$xml = new DOMDocument('1.0', 'UTF-8'); | |
$xml->formatOutput = true; | |
$rss = $xml->createElement('rss'); | |
$rss->setAttribute('version', '2.0'); | |
$rss->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:g', 'http://base.google.com/ns/1.0'); | |
$xml->appendChild($rss); |
--- | |
language: objective-c | |
before_script: | |
- ./scripts/travis/add-key.sh | |
after_script: | |
- ./scripts/travis/remove-key.sh | |
after_success: | |
- ./scripts/travis/testflight.sh | |
env: | |
global: |
// Source: http://www.highonphp.com/fixing-soap-exception-no-xml | |
class SoapClientNG extends \SoapClient{ | |
public function __doRequest($req, $location, $action, $version = SOAP_1_1){ | |
$xml = explode("\r\n", parent::__doRequest($req, $location, $action, $version)); | |
$response = preg_replace( '/^(\x00\x00\xFE\xFF|\xFF\xFE\x00\x00|\xFE\xFF|\xFF\xFE|\xEF\xBB\xBF)/', "", $xml[0] ); |
#!/usr/bin/env ruby | |
# Script to generate random images. Based on http://www.imagemagick.org/Usage/canvas/#random_blur | |
require 'optparse' | |
options = {} | |
optparse = OptionParser.new do |opts| |
import QtQml 2.0 | |
import com.qownnotes.noteapi 1.0 | |
QtObject { | |
function init() { | |
script.registerCustomAction("convertToMediaWiki", "Convert note to MediaWiki", "Convert to MediaWiki" ); | |
} | |
function customActionInvoked(identifier) { |