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/bash | |
URL="http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64-rpm.bin" | |
NAME="`basename ${URL}`" | |
wget --no-cookies --header 'Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com' --no-check-certificate ${URL} -O ${NAME} | |
chmod +x ${NAME} | |
./${NAME} |
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/bash | |
ip addr show | tail -n3 | head -n1 | cut -d' ' -f6 | cut -d'/' -f1 |
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
# Source accepts the protocol s3:// with the host as the bucket | |
# access_key_id and secret_access_key are just that | |
s3_file "/var/bulk/the_file.tar.gz" do | |
source "s3://your.bucket/the_file.tar.gz" | |
access_key_id your_key | |
secret_access_key your_secret | |
owner "root" | |
group "root" | |
mode 0644 | |
end |
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
var express = require('express'); | |
var app = express(); | |
function execute(inter, file, callback) { | |
var spawn = require('child_process').spawn; | |
var command;// = spawn('/usr/bin/python', [ file ]); | |
switch(inter) { | |
case "python": | |
command = spawn("/usr/bin/python", [ file ]); | |
break; |
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
from decimal import * | |
#Sets decimal to 25 digits of precision | |
getcontext().prec = 25 | |
def factorial(n): | |
if n<1: | |
return 1 | |
else: | |
return n * factorial(n-1) |
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
import lucene | |
from org.apache.lucene.store import SimpleFSDirectory | |
from org.apache.lucene.analysis import Analyzer | |
from org.apache.lucene.analysis.core import SimpleAnalyzer, LowerCaseFilter | |
from org.apache.lucene.analysis.synonym import SynonymFilter, \ | |
WordnetSynonymParser | |
from org.apache.lucene.analysis.standard import StandardAnalyzer, \ | |
ClassicTokenizer, StandardFilter |
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/bash | |
set -e | |
if [ $# -eq 0 ]; then | |
echo "USAGE: $0 plugin1 plugin2 ..." | |
exit 1 | |
fi | |
plugin_dir=/var/lib/jenkins/plugins |
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
%w(get post put delete).each do |http_method| | |
define_singleton_method(http_method.to_sym) do |path, *args| | |
RestClient::Resource.new("#{Qubell.configuration.endpoint}/api/" \ | |
"#{Qubell.configuration.api_version}#{path}", | |
Qubell.configuration.username, | |
Qubell.configuration.password) | |
.send(http_method.to_sym, *args) do |response| | |
handle_response(response) | |
end | |
end |
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
#!/usr/bin/python | |
import sys | |
import cmd | |
import json | |
import time | |
class InteractiveOrCommandLine(cmd.Cmd): | |
def do_init(self, _args): |
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
zk: | |
image: bobrik/zookeeper | |
ports: | |
- 2181:2181 | |
environment: | |
ZK_CONFIG: tickTime=2000,initLimit=10,syncLimit=5,maxClientCnxns=128,forceSync=no,clientPort=2181 | |
ZK_ID: 1 | |
master: | |
image: mesosphere/mesos-master:0.26.0-0.2.145.ubuntu1404 |
OlderNewer