Please note that this whole manual refers to the version 3.5.11 of Squid. You probably would have to adapt some commands to the version you will actually download.
This file contains hidden or 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 bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
# Can retrieve cloudflare Domain id and list zone's, because, lazy | |
# Place at: | |
# /usr/local/bin/cf-ddns.sh |
This file contains hidden or 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
#### Set english as default language | |
LANG='en_GB.UTF-8' | |
#### Start ssh-agent on first terminal session | |
SSH_ENV="$HOME/.ssh/environment" | |
function start_agent { | |
echo "Initialising new SSH agent..." | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" | |
echo succeeded |
This file contains hidden or 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
### add this to .bashrc | |
DEST_EMAIL="[email protected]" | |
TMPCOOKIE="/tmp/cookie.$(date +%y%m%d%H%M%S)" | |
CONNIP=$(echo $SSH_CONNECTION | cut -d " " -f 1) | |
touch ${TMPCOOKIE} | |
if [ -z "$CONNIP" ] | |
then | |
echo "${HOSTNAME}: User $USER just logged in from console" >> ${TMPCOOKIE} | |
echo >> ${TMPCOOKIE} | |
w >> ${TMPCOOKIE} |
This file contains hidden or 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 | |
# author: marco @ agate . io | |
# if this helped, donate your LTC here: Lcu3TvhGEfKfPndRMhoWjkSk9dAFXhYrn2 | |
FIREFOXBIN="/cygdrive/c/Program\ Files\ \(x86\)/Mozilla\ Firefox/firefox.exe -new-tab" | |
launchURL() { | |
myURL="$1" | |
faucet_name=$(echo $1 | cut -d\/ -f3) | |
echo "$(date +%H:%M:%S) ~ ${faucet_name}" | |
/cygdrive/c/Program\ Files\ \(x86\)/Mozilla\ Firefox/firefox.exe -new-tab "${myURL}" & |
I hereby claim:
- I am korovamilk on github.
- I am korovamilk (https://keybase.io/korovamilk) on keybase.
- I have a public key whose fingerprint is F8E8 D517 E9D0 9E8D 880B 0064 5ED1 D31E 5146 7A9D
To claim this, I am signing this object:
This file contains hidden or 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 | |
# Use this script to copy shared (libs) files to Apache/Lighttpd chrooted | |
# jail server. | |
# ---------------------------------------------------------------------------- | |
# Written by nixCraft <http://www.cyberciti.biz/tips/> | |
# (c) 2006 nixCraft under GNU GPL v2.0+ | |
# + Added ld-linux support | |
# + Added error checking support | |
# ------------------------------------------------------------------------------ | |
# See url for usage: |
This file contains hidden or 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 | |
confirm() { | |
echo -n "Continue? (y/n) " | |
read answer | |
case $answer in | |
y|Y|j|J"") return 0 ;; | |
n|N) return 1 ;; | |
*) confirm ;; | |
esac |
This file contains hidden or 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
# example email - real name list "<filename>" | |
# (note that name4 entry is broken - email appears 2 times | |
[email protected];"Real Name" | |
[email protected];"Real Name" | |
[email protected];"Real Name" | |
[email protected];[email protected];"Real Name" | |
# following awk will find and print the lines with MORE than one matching pattern | |
# (here I grep for "@") | |
$ awk '{n=split($0,c,"@")-1;if (n>1) print $0 }' <filename> |
This file contains hidden or 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 | |
TMP_FILE="/tmp/hosts" | |
HOSTS_FILE="/etc/hosts" | |
# WINDOWS: %systemroot%\system32\drivers\etc\hosts | |
touch ${TMP_FILE} | |
for URL in http://adaway.org/hosts.txt \ | |
http://winhelp2002.mvps.org/hosts.txt \ | |
http://someonewhocares.org/hosts/hosts \ |
NewerOlder