See the snippets "guide.md" and "redis.md" below.
If you're wanting to run Docker Swarm on your Raspberry Pi checkout these instructions:
See the snippets "guide.md" and "redis.md" below.
If you're wanting to run Docker Swarm on your Raspberry Pi checkout these instructions:
#!/bin/sh | |
# Open text files from Iterm2 in PhpStorm by command+clicking on it | |
# You will need the Remote call plugin in PhpStorm - https://plugins.jetbrains.com/plugin/6027 | |
# And of course curl | |
# wget this and chmod +x it | |
# then move it to somwhere convenient in your path (such as /usr/local/bin) | |
# With respects to https://gist.github.com/trinitronx/f59a8308d42d71fdba41 for the basis for this | |
# iterm_open_with - open a URL, file from CWD, full path, or path with linenumber in default app or PhpStorm if text file |
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
# Install dependencies | |
# | |
# * checkinstall: package the .deb | |
# * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
mkdir -p ~/sources/ && \ | |
# Compile against OpenSSL to enable NPN |
#!/bin/bash | |
# Put this file at: .git/hooks/post-checkout | |
# and make it executable | |
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587 | |
PREV_COMMIT=$1 | |
POST_COMMIT=$2 | |
NOCOLOR='\e[0m' |
import jenkins.model.* | |
for(item in Jenkins.instance.items) { | |
if(item.scm instanceof hudson.plugins.git.GitSCM){ | |
println("JOB : "+item.name) | |
print("useShallowClone: " + item.scm.useShallowClone) | |
item.scm.useShallowClone=true | |
println(" => "+item.scm.useShallowClone) | |
println("\n=======\n") | |
item.save() |
<?php | |
protected function execute(InputInterface $input, OutputInterface $output) | |
{ | |
$progress = $this->getHelperSet()->get('progress'); | |
$ctx = stream_context_create(array(), array('notification' => function ($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) use ($output, $progress) { | |
switch ($notification_code) { | |
case STREAM_NOTIFY_FILE_SIZE_IS: | |
$progress->start($output, $bytes_max); | |
break; |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
this_dir = File.dirname(__FILE__) + "/" | |
require this_dir + "vagrant/hostmaster.rb" | |
Vagrant::Config.run do |config| | |
# define some colors for our output | |
def colorize(text, color_code) "#{color_code}#{text}\033[0m" end |