Skip to content

Instantly share code, notes, and snippets.

View opexxx's full-sized avatar

Alexander Knorr opexxx

View GitHub Profile
@opexxx
opexxx / rails_resources.md
Created June 4, 2014 06:22 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@opexxx
opexxx / python_resources.md
Created June 4, 2014 06:22 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@opexxx
opexxx / 0_reuse_code.js
Created June 4, 2014 06:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
### http://www.hass.de/content/setup-your-iis-ssl-perfect-forward-secrecy-and-tls-12
# Add and Enable SSL 3.0 for client and server SCHANNEL communications
md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0' -Force
md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server' -Force
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server' -name 'Enabled' -value '0xffffffff' -PropertyType 'DWord' -Force
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server' -name 'DisabledByDefault' -value 0 -PropertyType 'DWord' -Force
# Add and Enable TLS 1.0 for client and server SCHANNEL communications
md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0' -Force
$servers = Get-Content C:\servers.txt
foreach($server in $servers)
{
if( Get-Service -ComputerName $server -Name "Sophos Message Router" -ErrorAction SilentlyContinue)
{
sc.exe \\$server stop "Sophos Message Router" | Out-Null
sleep 5
sc.exe \\$server start "Sophos Message Router" | Out-Null
# Clear console screen
clear
# Setup trap to catch exceptions
trap [Exception] {
Write-Error $("Trapped: " + $_.Exception.Message);
}
# Read computers from the text file
$computers = Get-Content 'C:\servers.txt';
# install dependencies
sudo apt-get install libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm
# clone cpuminer
git clone https://github.com/pooler/cpuminer.git
# compile
cd cpuminer
./autogen.sh
./configure CFLAGS="-O3"
@opexxx
opexxx / xor.py
Last active August 29, 2015 14:21 — forked from 013/xor.py
#!/usr/bin/python
# -*- coding: UTF-8 -*-
string = "something something something"
key = "cheese"
def crypt(string, key):
data = ''
for i in range(len(string)):
@opexxx
opexxx / ssh_tunnel
Last active August 29, 2015 14:21 — forked from jarus/ssh_tunnel
#!/bin/sh
# Simple init script to dig a ssh tunnel
# Author: Christoph Heer <christoph.heer@googlemail.com>
SSH_ARGS="user@remote.host -p 22 -N -n -L 4950:localhost:4949"
PID_FILE="/var/run/remote_host_tunnel.pid"
case "$1" in
start)
if [ -f $PID_FILE ]; then
@opexxx
opexxx / rpi-todo.md
Last active August 29, 2015 14:21 — forked from vancetran/rpi-todo.md