Skip to content

Instantly share code, notes, and snippets.

:environment
{:algorithms
{:lift-fn pallet.core/parallel-lift
:vmfest
{:create-nodes-fn pallet.compute.vmfest/parallel-create-nodes}
:converge-fn pallet.core/parallel-adjust-node-counts}
:phases {:bootstrap
(phase
(package-manager
:configure :proxy local-proxy))}
@gali1
gali1 / vpngen.rb
Created June 21, 2022 19:29 — forked from arnehormann/vpngen.rb
Configuration file generator for OpenVPN which also sets up a ca and generates keys.
#!/usr/bin/env ruby
# Just call this without arguments. It will show a friendly help text.
# For xterm-256color, it will even use colors for some commands!
class AppConfig
@@default_remote = 'vpn.example.com'
@@default_networks = '10.0.0.0/24>192.168.1.0/24'
@@default_subject = '/C=US/ST=CA/L=San Francisco/O=Example/OU=/CN={{name}}'
@gali1
gali1 / gist:6c3090d1dfb4c40f9c2bf2921cb48547
Created August 3, 2022 16:37 — forked from jedi4ever/gist:903751
Tuning stuff for Ubuntu hosts
# /etc/security/limits.conf
* soft nofile 999999
* hard nofile 999999
root soft nofile 999999
root hard nofile 999999
===========================================================
# /etc/sysctl.conf
# sysctl for maximum tuning
@gali1
gali1 / unbound.conf
Created August 3, 2022 16:52 — forked from MatthewVance/unbound.conf
Config for running Unbound as a caching DNS forwarder (performance settings optimized for Raspberry Pi 2).
server:
###########################################################################
# BASIC SETTINGS
###########################################################################
# Time to live maximum for RRsets and messages in the cache. If the maximum
# kicks in, responses to clients still get decrementing TTLs based on the
# original (larger) values. When the internal TTL expires, the cache item
# has expired. Can be set lower to force the resolver to query for data
# often, and not trust (very large) TTL values.
cache-max-ttl: 86400
@gali1
gali1 / readme.md
Last active August 15, 2022 01:54 — forked from mitio/readme.md
A small script to run a single command on multiple servers.

Run a command on multiple servers

A small script to allow running the same command on multiple servers. The commands are ran in series so that if you see an error somewhere, you can quickly bail out with Ctrl + C and avoid further damage to your servers.

Usage

Run as:

run-on dbserver.mysite.com frontend.mysite.com 'date; df -h /tmp'
@gali1
gali1 / unbound.conf
Created October 1, 2022 04:17 — forked from edermi/unbound.conf
My unbound config
server:
# log verbosity
verbosity: 1
use-syslog: yes
interface: 127.0.0.1
interface: ::1
do-ip6: yes
@gali1
gali1 / abbreviated-unbound.conf
Created October 1, 2022 04:17 — forked from martinrusev/abbreviated-unbound.conf
Unbound (http://unbound.net/) configuration for local network device testing.
# The server clause sets the main parameters.
server:
# Allow network connections outside of localhost
interface: 0.0.0.0
# Don't automatically run in the background because I want to be able to kill it without hunting a pid
do-daemonize: no
# TODO: Change this to your network range, like `192.168.0.0/16 allow`
access-control: 10.0.0.0/16 allow
# TODO: Change this to your username, or whatever user you want to run/own the `unbound` process
username: "bryanjswift"
forward-zone:
name: "."
# forward-addr: 1.1.1.1@853#cloudflare-dns.com
# forward-addr: 1.0.0.1@853#cloudflare-dns.com
# forward-addr: 2606:4700:4700::1111@853#cloudflare-dns.com
# forward-addr: 2606:4700:4700::1001@853#cloudflare-dns.com
forward-addr: 2001:41d0:302:2200::180@853#dot.bortzmeyer.fr
forward-addr: 193.70.85.11@853#dot.bortzmeyer.fr
forward-addr: 91.239.100.100@853#anycast.censurfridns.dk
@gali1
gali1 / squid.conf
Created October 13, 2022 23:00 — forked from peter279k/squid.conf
The url redirection configuration for Squid Proxy Server
# WELCOME TO SQUID 3.5.12
# ----------------------------
#
# This is the documentation for the Squid configuration file.
# This documentation can also be found online at:
# http://www.squid-cache.org/Doc/config/
#
# You may wish to look at the Squid home page and wiki for the
# FAQ and other documentation:
# http://www.squid-cache.org/
@gali1
gali1 / url_redirect.php
Last active October 20, 2022 08:15 — forked from peter279k/url_redirect.php
PHPRedirect helper for squid proxy server.
#!/usr/bin/php
# Squid URL Rewrite program : Codes picked from the internet.
<?php
$temp = array();
// Extend stream timeout to 24 hours
stream_set_timeout(STDIN, 86400);
while ( $input = fgets(STDIN) ) {
// Split the output (space delimited) from squid into an array.