$ vagrant box add {title} {url}
$ vagrant init {title}
$ vagrant up
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
build_names = [] | |
build_names.append(dict(name='build_id', branch='master', slaves=['bbslave'], | |
scheduler=['single', 'force', 'periodic', 'nightly'])) | |
build_names.append(dict(name='branch_id', branch='branch_id', slaves=['bbslave'], | |
scheduler=['single', 'periodic'])) | |
build_names.append(dict(name='branch_idm', branch='master', slaves=['bbslave'], | |
scheduler=['single', 'force','periodic'])) | |
print '' | |
print 'original: ', build_names |
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
<!-- add Javascript in html head --> | |
<script> | |
var reloading; | |
var refresh_time = 30000; | |
function checkReloading() { | |
if (window.location.hash=="#autoreload") { | |
reloading=setTimeout("window.location.reload();", refresh_time); | |
document.getElementById("reloadCB").checked=true; | |
} |
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 | |
# Credits to: | |
# - http://vstone.eu/reducing-vagrant-box-size/ | |
# - https://github.com/mitchellh/vagrant/issues/343 | |
# - https://gist.github.com/adrienbrault/3775253 | |
## for vagrant related tasks, uncomment vagrant comments | |
# vagrant: Unmount project |
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
# add next command to the command line | |
alias duf='du -sk * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit} - ${fname}"; break; fi; size=$((size/1024)); done; done' | |
# run next commands and see output | |
cd / | |
duf | |
# more info at http://www.carlessanagustin.com/2010/09/22/shell-como-obtener-el-tamano-de-carpeta-via-linea-de-comandos/ |
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
## An A-Z Index of Windows PowerShell 2.0 commands: http://ss64.com/ps/ | |
do { | |
$ip = Read-Host "Enter IP address" | |
$mask = Read-Host "Enter mask" | |
$gw = Read-Host "Enter default gateway" | |
Write-Host 'Is this information correct? IP $ip MASK $mask GW $gw' | |
$confirm = Read-Host "yes/no" | |
}while ($confirm -notlike "yes") |
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 find $1/cache/smarty/cache -type f ! -regex ".*/\(index.php\)" -delete | |
sudo find $1/cache/smarty/compile -type f ! -regex ".*/\(index.php\)" -delete | |
sudo find $1/img/ tmp -type f ! -regex ".*/\(index.php\)" -delete | |
# continue reading: http://www.templatemonster.com/help/prestashop-1-6-x-how-to-clear-smarty-cache.html |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.boot_timeout = 60 | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = 512 | |
vb.cpus = 1 | |
vb.gui = false |
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
# Number of worker processes. Set it to the number of available CPU cores as a good start value or use 'auto' to autodetect it | |
worker_processes 4; | |
# User and group used by worker processes | |
user www-data www-data; | |
# Skip superfluous info in the main error log file | |
error_log /var/log/nginx/error_log error; | |
# Limit number of files a worker process can open |
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
server { | |
listen 80; | |
charset utf-8; | |
server_name your-site.com www.your-site.com; | |
#index index.html index.htm; | |
# myApp at port 8010 | |
location /myApp { | |
return 301 http://$host:8010$request_uri; |
OlderNewer