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 | |
# | |
# ========================================================================= | |
# Copyright 2014 Rado Buransky, Dominion Marine Media | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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 | |
### BEGIN INIT INFO | |
# Provides: playframework | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/Stop playframework | |
### END INIT INFO | |
# |
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
SUITE=sid MIRROR=http://http.debian.net/debian DESTINATION=hdd MACHINE=virtualbox ARCHITECTURE=i386 | |
vmdebootstrap --log build/freedombox.log --log-level debug --size 4G \ | |
--image build/freedombox-unstable_2015-01-14_virtualbox-i386-hdd.img \ | |
--hostname freedombox --verbose --mirror http://http.debian.net/debian \ | |
--customize /usr/local/src/freedom-maker/bin/freedombox-customize \ | |
--lock-root-password --arch i386 --roottype btrfs --distribution sid \ | |
--grub --enable-dhcp \ | |
--package apt --package base-files --package ifupdown --package initramfs-tools \ | |
--package logrotate --package module-init-tools --package netbase --package rsyslog \ | |
--package udev --package debian-archive-keyring |
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
DROP TABLE IF EXISTS playing; | |
DROP TABLE IF EXISTS film; | |
DROP TABLE IF EXISTS category; | |
DROP TABLE IF EXISTS kino; | |
-- userless: drop tables seem also to drop the sequences | |
-- DROP SEQUENCE IF EXISTS film_film_id_seq; | |
-- DROP SEQUENCE IF EXISTS category_category_id_seq; | |
-- DROP SEQUENCE IF EXISTS kino_kino_id_seq; |
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
# get proxmox source code | |
git clone git://git.proxmox.com/git/pve-kernel-3.10.0.git | |
# switch to kernel ABI level | |
uname -srm | |
Linux 3.10.0-8-pve x86_64 | |
git checkout -b 8-pve 5623bd4590a1dfbb0a0c05afd20a7568e639773e | |
# compile kernel | |
make data | |
# install necessary symlinks | |
sudo ln -s $PWD/linux-2.6-3.10.0/ /lib/modules/$(uname -r)/build |
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 | |
# if no parameter is passed, consider we want to convert mp3 files | |
test -n "$1" && EXT=$1 || EXT=mp3 | |
#remvove spaces and funky characters in file names | |
detox *.${EXT} | |
#shorten file names to follow FAT 8.3 convention | |
rename -v "s/(\S{8}).*/\$1.${EXT}/g" *.${EXT} |
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
# show or hide a component by id ( this is an HTML div id) | |
# <div id="north-region-container" .... | |
#pkmk | |
Ext.getCmp('north-region-container').getEl().show(); | |
#pve | |
Ext.getCmp('content').getEl().show(); | |
# Get store content of a component ( here with id 'mybuilder' | |
Ext.getCmp('myBuilder').store.data.items |
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
class elasticsearch-river-mongodb ($version = '1.6.8') { | |
exec {'elasticsearch-mapper-attachment': | |
require => Package['elasticsearch'], | |
command => '/usr/share/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.7.0', | |
creates => '/usr/share/elasticsearch/plugins/mapper-attachments/elasticsearch-mapper-attachments-1.7.0.jar', | |
} | |
exec {'elasticsearch-river-mongodb': | |
require => Exec['elasticsearch-mapper-attachment'], |
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 | |
export OS=Debian7 | |
virt-install \ | |
--connect qemu:///system \ | |
--name ${OS} \ | |
--ram 512 \ | |
--vcpus 1 \ | |
--file ${OS}.img \ |
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
# create a temporary inventory file | |
echo "vagrant ansible_ssh_host=localhost ansible_ssh_user=vagrant ansible_ssh_port=2222" > hosts | |
# run a root shell in the vagrant env | |
ansible \ | |
--inventory hosts \ | |
--private-key=/opt/vagrant/embedded/gems/gems/vagrant-1.2.7/keys/vagrant \ | |
--sudo \ | |
--args "id" vagrant |
OlderNewer