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
# NOTE: This gist includes the '.sh' extension to enable syntax highlighting | |
# on the gist web viewer. However, it is NOT intended to be run as a script. | |
# These are just notes I took. | |
################################################################################ | |
# | |
# CentOS 7 - Simple IPv4 NAT Router | |
# | |
# This gist provides a brief walkthough on setting up a simple NAT router on | |
# CentOS 7 that will allow multiple machines on an internal network to share |
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
# ___ ___ __ __ | |
# / | __ ______/ (_) /_____/ / | |
# / /| |/ / / / __ / / __/ __ / | |
# / ___ / /_/ / /_/ / / /_/ /_/ / | |
# /_/ |_\__,_/\__,_/_/\__/\__,_/ | |
# | |
# Linux Audit Daemon - Best Practice Configuration | |
# /etc/audit/audit.rules | |
# | |
# Compiled by Florian Roth |
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 ruby | |
require 'redcarpet' | |
md_file = File.read(ARGV.first) | |
html_filename = File.basename(ARGV.first, ".md") + ".html" | |
File.open(html_filename, 'w') do |file| | |
file.write(Redcarpet::Markdown.new(Redcarpet::Render::HTML.new).render(md_file)) | |
end |
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 ruby | |
# | |
# This code snippet shows how to enable SSL in Sinatra+Thin. | |
# | |
require 'sinatra' | |
require 'thin' | |
class MyThinBackend < ::Thin::Backends::TcpServer | |
def initialize(host, port, options) |
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 ruby | |
# | |
# This code snippet shows how to enable SSL in Sinatra. | |
# | |
require 'sinatra/base' | |
class Application < Sinatra::Base | |
configure do | |
set :bind, '0.0.0.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 'rubygems' | |
require 'bcrypt' | |
require 'haml' | |
require 'sinatra' | |
enable :sessions | |
userTable = {} | |
helpers do |
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
[General] | |
UseLocalGeoIpDatabase=true | |
LocalGeoIpDatabase=/var/lib/GeoIP/GeoIP.dat | |
[..snip..] |
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
tor --hash-password <YOUR_PASSWORD_HERE> |
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
User tor | |
RunAsDaemon 1 | |
PidFile /var/run/tor/tor.pid | |
DataDirectory /var/lib/tor | |
Log notice file /var/log/tor/tor.log | |
SafeSocks 1 | |
TestSocks 1 | |
CircuitBuildTimeout 2 |
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
sqg -p tor | |
sqg -p vidalia | |
sqg -p GeoIP | |
sbopkg -i "tor vidalia GeoIP" |
NewerOlder