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
# Rakefile | |
# Use env.rb for environment variables | |
require "./env" | |
# Duplicity command | |
$cmd = "/usr/local/bin/duplicity --ssh-options=\"-oIdentityFile=#{$keyfile}\"" | |
# Print message | |
def msg(task, dir) | |
msg = "*** #{task.upcase} - #{dir.upcase} ***" |
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
# Rakefile | |
# use web.rb to run web server | |
task generate: [:clean] do | |
sh "gem generate_index --no-modern -d ." | |
end | |
task :clean do | |
sh "rm -fr latest_specs.4.8* prerelease_specs.4.8* quick specs.4.8*" | |
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
require 'date' | |
date = DateTime.now.strftime("%Y%m%d%H%M") | |
$homedir = Dir.home | |
$dotfiles = [ '.bash_profile', '.bashrc', '.gitconfig', '.kshrc', '.profile', '.tmux.conf', '.vimrc' ] | |
desc "backup dotfiles" | |
task :backup do |t| | |
backupdir = File.join($homedir,"/",t.name) | |
backupfile = "dotfiles-home.#{date}.tar" |
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 | |
# | |
# source: http://www.macgasm.net/2013/01/18/good-morning-your-mac-keeps-a-log-of-all-your-downloads/ | |
#. | |
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent'. |
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
version: '2' | |
services: | |
mongo1: | |
container_name: mongo1 | |
image: mongo:2.4 | |
expose: | |
- 27017 | |
networks: | |
- mongo | |
command: mongod --replSet rs0 --smallfiles --oplogSize 128 |
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 | |
# | |
# deploy ssh keys, configure sudo and install salt on new debian server | |
# require config file .myenv with variables MYUSER and SSHPUBKEY | |
source_my_env() | |
{ | |
if [ -f ${MYENV} ] | |
then | |
. ${MYENV} |
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
--- | |
- hosts: ansible | |
vars: | |
local_user: {{ user }} | |
ansible_private_key: ansible.pem | |
ansible_public_key: ansible.pub | |
become: yes | |
tasks: | |
- name: ensure ansible and passlib are installed |
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 fabric.api import * | |
def is_local(): | |
if env.host == 'localhost': | |
env.lrun = local | |
else: | |
env.lrun = run | |
print('host %(host)s using function %(lrun)s' % env) |
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
# -*- coding: utf-8 -*- | |
""" | |
Upload folder to Google Drive | |
""" | |
# Enable Python3 compatibility | |
from __future__ import (unicode_literals, absolute_import, print_function, | |
division) |
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 com.ifountain.opsgenie.client.http.OpsGenieHttpClient | |
import com.ifountain.opsgenie.client.util.ClientConfiguration | |
import com.ifountain.opsgenie.client.util.JsonUtils | |
import org.apache.http.HttpHeaders | |
import org.apache.http.auth.UsernamePasswordCredentials | |
import org.apache.http.impl.auth.BasicScheme | |
LOG_PREFIX = "[${action}]:"; | |
logger.warn("${LOG_PREFIX} Will execute action for alertId ${alert.alertId}"); |
OlderNewer