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
{ | |
"font_size": 15, | |
"ignored_packages": | |
[ | |
"Vintage", | |
"Markdown" | |
], | |
"open_files_in_new_window": false, | |
"soda_classic_tabs": true, | |
"soda_folder_icons": 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/bash | |
while getopts a:bc: flag; do | |
case $flag in | |
a) | |
opt_a=$OPTARG | |
;; | |
b) | |
opt_b=1 | |
;; |
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
ssh -D 9999 user@server | |
use socks 4\5, disable other proxy settings |
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
fpm --force \ | |
-s dir \ | |
-t deb \ | |
--vendor dragolabs \ | |
--maintainer 'Vitaly Shishlyannikov <vitaly@dragolabs.org>' \ | |
--deb-user root \ | |
--deb-group root \ | |
--url http://dragolabs.org \ | |
--version $VERSION \ | |
--iteration ddr`date +%y%m%d%H%M` \ |
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
#!/usr/bin/env bash | |
set -o pipefail | |
set -o errexit | |
# set -o xtrace | |
__DIR__="$(cd "$(dirname "${0}")"; echo $(pwd))" | |
__BASE__="$(basename "${0}")" | |
__FILE__="${__DIR__}/${__BASE__}" |
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
# | |
# Author:: Vitaly Shishlyannikov (<vitaly@dragolabs.org>) | |
# Copyright:: Copyright (c) 2014 | |
# License:: Apache License, Version 2.0 | |
# | |
# 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
require 'socket' | |
def have_ip?(ip) | |
ip_arr = Socket.ip_address_list.select{|intf| intf.ipv4?} | |
ip_arr.to_s.scan(/(?<=: )[\d.]+(?=>)/).find{ |e| /#{ip}/ =~ e } | |
end | |
if File.exist?('/var/local/location.txt') | |
dc_location = File.read('/var/local/location.txt') |
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
sudo aptitude safe-upgrade `dpkg -l | awk {'print $2'}| grep -e "^libc[-|6]" | paste -s` | |
or | |
sudo aptitude safe-upgrade `dpkg -l | cut -d " " -f 3 | grep -e "^libc[-|6]" | paste -s` |
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 | |
echo "Set description for chef's nodes. Press ENTER to skip node." | |
for NODE in `knife search "! desc:*" -i | tail -n+2`;do | |
echo "Node: ${NODE}" | |
echo -n 'Description: ' | |
read DESC | |
if [ ! -z "${DESC}" ];then | |
knife node attribute set ${NODE} desc "${DESC}" | |
else |
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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": ["s3:ListBucket"], | |
"Resource": ["arn:aws:s3:::my-backup"] | |
}, | |
{ | |
"Effect": "Allow", |
OlderNewer