Skip to content

Instantly share code, notes, and snippets.

View feniix's full-sized avatar
🇦🇷

Sebastian B Otaegui feniix

🇦🇷
View GitHub Profile
@feniix
feniix / -
Created October 29, 2014 23:12
docker-enter () {
vagrant ssh abed1ef -- '[ -f /var/lib/boot2docker/nsenter ] || docker run --rm -v /var/lib/boot2docker/:/target jpetazzo/nsenter'
vagrant ssh abed1ef -- -t sudo /var/lib/boot2docker/docker-enter "$@"
}
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:2.0">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
<extension module="org.jboss.as.jaxrs"/>
@feniix
feniix / gist:2654f2b5f043ad895315
Last active August 29, 2015 14:08
Son, we need to have a chat about Internet Safety
"Son, we need to have a chat about Internet Safety.” I slowly crumpled down onto the floor next to him. His laptop
was open and he was playing Minecraft on a public server. His eyes were locked into the action. Comments scrolled
down the side of the screen in a chat box. “Son, can you stop your game for a minute?”
He exited the world, closed the laptop, and looked up at me. "Dad, is this going to be another cheesy scary story?"
"Whhaaaat?" I faked hurt feelings for a second, and then grinned at him, "I thought you liked my cautionary tales?" He grew up listening to my stories about children who encountered witches, ghosts, werewolves, and trolls. Like many generations of parents,
I used scary stories to reinforce morals and teach lessons about safety. Single dads like me should use all the parenting tools
at their disposal.
#!/usr/bin/env bash
TAR=$(command -v tar)
S3CMD=$(command -v s3cmd)
MONGO=$(command -v mongo)
MDUMP=$(command -v mongodump)
MRESTORE=$(command -v mongorestore)
if [[ -z ${TAR} ]] || [[ -z ${S3CMD} ]] || [[ -z ${MONGO} ]] || [[ -z ${MDUMP} ]] || [[ -z ${MRESTORE} ]]; then
echo "One of the following tools is missing: tar, s3cmd, mongo, mongodump, mongorestore"
#!/usr/bin/env bash
BAKDIR=/tmp/backup
prereqs () {
cat << EOF
${0} assumes you have the following components:
* tar
* s3cmd configured (run s3cmd --configure)
==> master: Running provisioner: shell...
master: Running: /var/folders/w8/_qfs4h512y71h6tl2spqmd3m0000gn/T/vagrant-shell20150105-62375-1ojdp7d.sh
==> master: Copied Puppetfile
==> master: Puppetfile: OK
==> master: Skipping librarian-puppet (Puppetfile unchanged)
==> master: Running provisioner: puppet...
==> master: Running Puppet with default.pp...
==> master: Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
==> master: Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/windows_common_appdata.rb
==> master: Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/last_run.rb
==> master: Running provisioner: shell...
master: Running: /var/folders/w8/_qfs4h512y71h6tl2spqmd3m0000gn/T/vagrant-shell20150106-67083-8rg792.sh
==> master: Copied Puppetfile
==> master: Puppetfile: OK
==> master: Skipping librarian-puppet (Puppetfile unchanged)
==> master: Running provisioner: puppet...
==> master: Running Puppet with default.pp...
==> master: Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
==> master: Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/windows_common_appdata.rb
==> master: Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/last_run.rb
require 'rake/clean'
require 'rake/task'
desc 'run install bower'
task :npm_install_bower do
system('npm install bower')
end
desc 'run bower install'
task :bower_install do
@feniix
feniix / -
Created January 22, 2015 00:32
{
"LaunchConfigurations": [
{
"UserData": "I2Nsb3VkLWNvbmZpZwojCiMjIHJ1biBjb21tYW5kcwojIyBkZWZhdWx0OiBub25lCiMjIHJ1bmNtZCBjb250YWlucyBhIGxpc3Qgb2YgZWl0aGVyIGxpc3RzIG9yIGEgc3RyaW5nCiMjIGVhY2ggaXRlbSB3aWxsIGJlIGV4ZWN1dGVkIGluIG9yZGVyIGF0IHJjLmxvY2FsIGxpa2UgbGV2ZWwgd2l0aAojIyBvdXRwdXQgdG8gdGhlIGNvbnNvbGUKIyMgLSBpZiB0aGUgaXRlbSBpcyBhIGxp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