You can post a json file with curl
like so:
curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
so for example:
require 'matrix' | |
# fib1: Fast algorithm using the Golden Ratio | |
$sqrt5 = Math.sqrt 5 | |
$phi = (1 + $sqrt5) / 2 | |
def fib1 n | |
(($phi**n - (1-$phi)**n) / $sqrt5).to_int | |
end |
import "com.vividsolutions.jump.workbench.ui.AttributeTab" | |
import "com.vividsolutions.jump.workbench.ui.LayerViewPanel" | |
workbench_frame = $wc.workbench.frame | |
menu_bar = workbench_frame.get_jmenu_bar() | |
tool_bar = workbench_frame.get_tool_bar() # as JToolBar | |
layer_name_popup_menu = workbench_frame.get_layer_name_popup_menu() | |
category_popup_menu = workbench_frame.get_category_popup_menu() |
# Add these methods to your ApplicationController. Then, any controller | |
# that inherits from it will have these methods and can programmatically | |
# determine what filters it has set. | |
class ApplicationController < ActionController::Base | |
def self.filters(kind = nil) | |
all_filters = _process_action_callbacks | |
all_filters = all_filters.select{|f| f.kind == kind} if kind | |
all_filters.map(&:filter) | |
end |
function getPhoto() { | |
navigator.camera.getPicture(onPhotoSuccess, onPhotoFail, | |
{quality: 70, targetWidth: 500, targetHeight: 500, | |
sourceType: navigator.camera.SourceType.PHOTOLIBRARY, | |
destinationType: navigator.camera.DestinationType.FILE_URI, | |
}); | |
} | |
function onPhotoSuccess(imageUri) { | |
var $img = $('<img/>'); |
global | |
nbproc 1 | |
maxconn 65536 | |
defaults | |
timeout connect 5s | |
timeout queue 5s | |
timeout server 30s | |
timeout tunnel 1h |
<div id="fb-root"></div> | |
<script> | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId: 'xxxxxxxxxxxxx', | |
status: true, | |
cookie: true, | |
xfbml: true | |
}); |
# Ignore bundler config | |
/.bundle | |
/vendor/bundle/ | |
/vendor/ruby/ | |
# Ignore the default database. | |
/db/*.sqlite3 | |
/db/*.javadb/ | |
# Ignore all logfiles and tempfiles. |
git checkout -b T1234-boo-foo
git commit -am 'first'
git commit -am 'now it works'
arc lint
arc diff
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |