Skip to content

Instantly share code, notes, and snippets.

@bytearchive
bytearchive / ALTERNATIVES.adoc
Created August 9, 2016 00:54 — forked from mbbx6spp/ALTERNATIVES.adoc
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@bytearchive
bytearchive / Install Ruby and RubyGems
Created August 9, 2016 02:14 — forked from chiraggude/Install Ruby and RubyGems
Install Ruby 2.1.1 and RubyGems 1.8.25 on CentOS 6.5
# Install Ruby
wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
tar xvzf ruby-2.1.1.tar.gz
cd ruby-2.1.1
./configure --prefix=/usr
make
make install
# remove "ruby-2.1.1" folder in /root

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@bytearchive
bytearchive / simple_http_server.sh
Created September 1, 2016 21:42 — forked from tdpreece/simple_http_server.sh
Running a Python SimpleHTTPServer in the background and killing it when doneSimpleHTTPServer
#!/usr/bin/env bash
# Create a page in the current dir
echo "My Test Page" > test.html
# Start server
python -m SimpleHTTPServer 8000 &> /dev/null &
pid=$!
# Give server time to start up
@bytearchive
bytearchive / SimpleAuthServer.py
Created September 5, 2016 20:25 — forked from fxsjy/SimpleAuthServer.py
SimpleAuthServer: A SimpleHTTPServer with authentication
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''
def do_HEAD(self):
@bytearchive
bytearchive / SimpleAuthServer.py
Created September 5, 2016 20:34 — forked from tonyxh/SimpleAuthServer.py
SimpleAuthServer: A SimpleHTTPServer with authentication
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''
def do_HEAD(self):
@bytearchive
bytearchive / Install HTTPie.md
Created September 7, 2016 01:16 — forked from BlakeGardner/Install HTTPie.md
Install HTTPie Mac OS X

This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip. An installed copy of Homebrew is a prerequisite.

HTTPie

# install the python package provided with homebrew
brew install python

# install HTTPie with the pip utility
pip install httpie
@bytearchive
bytearchive / rqretryworker.py
Created September 19, 2016 06:55 — forked from spjwebster/rqretryworker.py
A basic rq worker that will retry failed jobs before dumping it in the failed queue.
#!/usr/bin/env python
import os, sys
sys.path.append(os.getcwd())
import logging
import rq
MAX_FAILURES = 3
@bytearchive
bytearchive / bootstrap-tabs.html
Created September 24, 2016 23:22 — forked from mnewt/bootstrap-tabs.html
bootstrap tabs example
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Le styles -->
<link href="../bootstrap/css/bootstrap.css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
</head>
<body>
@bytearchive
bytearchive / id_rsa_encryption.md
Created October 6, 2016 04:03
Encrypt/Decrypt a File using your SSH Public/Private Key on Mac OS X

A Guide to Encrypting Files with Mac OS X

This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.

Too Long, Didn't Read

Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…

Encrypting

$ openssl rand 192 -out key

$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key