$ cd /Applications/iTunes.app/Contents/MacOS
$ sudo chmod -x iTunes iTunesASUHelper
$ ls -lhdO iTunes iTunesASUHelper
-rw-r--r-- 1 root wheel compressed 30M Jun 2 14:39 iTunes
-rw-r--r-- 1 root wheel compressed 18K Jun 2 14:39 iTunesASUHelper
$ sudo chflags schg,uchg iTunes iTunesASUHelper
$ sudo chmod +x iTunes
chmod: Unable to change file mode on iTunes: Operation not permitted
$ ls -lhdO iTunes iTunesASUHelper
This file contains hidden or 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
find . -name "*.bro" -exec grep -Hni create_stream {} 2>/dev/null \; \ | |
| perl -n -e'/^([^:]+):.*create_stream\(([^:]+::\S+),/ && print "$1\t$2,\n"' \ | |
| sed '/testing/d;/doc/d' \ | |
| awk '{ print $2 }' | sort | uniq |
This file contains hidden or 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
[local] | |
name=Locally built packages | |
baseurl=file:///vagrant/repo/all | |
gpgcheck=0 | |
enabled=1 |
This file contains hidden or 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
yum -y localinstall http://fedorapeople.org/groups/katello/releases/yum/3.0/katello/el7/x86_64/katello-repos-latest.rpm | |
yum -y localinstall http://yum.theforeman.org/releases/1.11/el7/x86_64/foreman-release.rpm | |
yum -y localinstall http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm | |
yum -y localinstall http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
yum -y install foreman-release-scl sclo-ror42 centos-release-scl | |
yum -y install katello |
This file contains hidden or 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/local/bin/set_proxy.sh | |
# Sets proxy env vars. | |
# To use, source this into your shell: | |
# | |
# . /usr/local/bin/set_proxy.sh | |
PROXY_HOST=my-company-proxy.example.com | |
PROXY_PORT=3128 | |
read -p "Enter your username: " PROXY_USER |
This file contains hidden or 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 python2 | |
from multiprocessing import Pool | |
from time import sleep | |
from random import randint, gauss | |
import os, sys | |
import requests | |
## TODO | |
# . recursively download linked resources: | |
# . images |
This file contains hidden or 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
### Purge all networks & routers | |
# Clear all gateways | |
neutron router-list -f value | \ | |
awk '{ print $1 }' | \ | |
xargs -n1 neutron router-gateway-clear | |
# Delete all router ports | |
neutron router-list -f value | \ |
This file contains hidden or 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
# Set dircolors for bash `ls` friendly for a dark solarized terminal | |
curl -o ~/.dircolors -L https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-dark | |
eval `dircolors ~/.dircolors` | |
# Checkout gnome-terminal solarized config | |
cd /tmp | |
git clone https://github.com/Anthony25/gnome-terminal-colors-solarized.git | |
cd gnome-terminal-colors-solarized | |
./set_dark.sh | |
cd /tmp; rm -rf gnome-terminal-colors-solarized |
This file contains hidden or 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
[Unit] | |
Description=Kafka distributed logging server | |
Requires=zookeeper.service | |
After=zookeeper.service | |
[Service] | |
User=kafka | |
Group=kafka | |
SyslogIdentifier=kafka | |
Environment="KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:/opt/kafka/config/log4j.properties" |
This file contains hidden or 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 | |
for item in $(find . -type d -depth 1 | grep -Ev 'dir|names|toexclude'); do | |
tar cvf - ${item} | 7za a -si ${item}.tar.7z; | |
rm -rf ${item}; | |
done |