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 | |
apt-get update -y | |
apt-get install -y build-essential | |
wget -O ruby-install-0.5.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.5.0.tar.gz | |
tar -xzvf ruby-install-0.5.0.tar.gz | |
cd ruby-install-0.5.0/ | |
make install |
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 sys | |
reload(sys) # Reload does the trick! | |
sys.setdefaultencoding('UTF8') |
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 debian:wheezy | |
# phusion/baseimage:0.9.12 | |
ENV HOME /root | |
WORKDIR /root | |
RUN apt-get update && apt-get install -y build-essential libxslt1-dev libxml2-dev zlib1g-dev libpcre3-dev libbz2-dev libssl-dev wget git | |
RUN wget http://nginx.org/download/nginx-1.6.1.tar.gz && tar xf nginx-1.6.1.tar.gz && git clone https://github.com/yaoweibin/nginx_tcp_proxy_module.git | |
RUN cd nginx-1.6.1 && patch -p1 < ../nginx_tcp_proxy_module/tcp.patch | |
RUN cd nginx-1.6.1 && ./configure --add-module=../nginx_tcp_proxy_module --prefix=/nginx && make && make install | |
RUN apt-get purge -y build-essential wget git && apt-get clean autoclean && apt-get autoremove -y |
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
apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential libevent-dev libtool autoconf automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev | |
#git | |
#procps-ng | |
./configure --prefix=/usr \ | |
--exec-prefix= \ | |
--libdir=/usr/lib \ |
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 | |
printername="XX - Lexmark" | |
location="XX - YY Office" | |
gui_display_name="XX - Lexmark" | |
address="socket://10.51.0.2" | |
driver_ppd="/Library/Printers/PPDs/Contents/Resources/Lexmark CX410 Series.gz" | |
### Printer Install ### | |
# Install the printer. | |
/usr/sbin/lpadmin -p "SF.3F.Lexmark" -L "MT-SF Office" -E -v socket://10.51.0.2 -P "$driver_ppd" -o printer-is-shared=false |
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 python | |
import SimpleHTTPServer | |
class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def end_headers(self): | |
self.send_my_headers() | |
SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self) | |
def send_my_headers(self): |
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
remote: error: refusing to update checked out branch: refs/heads/master | |
remote: error: By default, updating the current branch in a non-bare repository | |
remote: error: is denied, because it will make the index and work tree inconsistent | |
remote: error: with what you pushed, and will require 'git reset --hard' to match | |
remote: error: the work tree to HEAD. | |
remote: error: | |
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to | |
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into | |
remote: error: its current branch; however, this is not recommended unless you | |
remote: error: arranged to update its work tree to match what you pushed in some |
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 python | |
import os, hashlib | |
current_dir = os.getcwd() | |
hashes = [] | |
for root,dirs,files in os.walk(current_dir): | |
for f in files: | |
current_file = os.path.join(root,f) | |
H = hashlib.md5() | |
try: |
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-keygen -t ecdsa -b 521 |
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 | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install build-essential | |
sudo apt-get -y install git-core | |
sudo apt-get -y install libssl1.0.0 libssl-dev | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile | |
echo 'eval "$(rbenv init -)"' >> .bash_profile | |
source ~/.bash_profile |
OlderNewer