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 bash | |
# /etc/profile.d/best_bash_history.sh | |
# Save 5,000 lines of history in memory | |
HISTSIZE=10000 | |
# Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing) | |
HISTFILESIZE=2000000 | |
# Append to history instead of overwrite | |
shopt -s histappend | |
# Ignore redundant or space commands | |
HISTCONTROL=ignoreboth |
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/python | |
# 8th November, 2009 | |
# update manager failed, giving me the error: | |
# 'files list file for package 'xxx' is missing final newline' for every package. | |
# some Googling revealed that this problem was due to corrupt files(s) in /var/lib/dpkg/info/ | |
# looping though those files revealed that some did not have a final new line | |
# this script will resolve that problem by appending a newline to all files that are missing it | |
# NOTE: you will need to run this script as root, e.g. sudo python newline_fixer.py |
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
# this is an rsync-excludes format list of files to exclude. |
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
#!/bin/sh | |
#set -x | |
EMAIL=someone@example.com | |
OLDHOME=${HOME} | |
cd ~/lynis | |
. /etc/apache2/envvars | |
./lynis -c -Q -q --profile /etc/lynis/default.prf |
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
#!/bin/sh | |
# This script will automatically: | |
# * download [Lynis](https://cisofy.com/lynis/), an open source security auditing tool | |
# * run a full audit check, either privileged, or non-privileged if not logged in as root | |
# * cleanup by removing the downloaded archive, and the extracted directory it ran out of | |
# * save the audit report to your local directory (YYYYMMDD-lynis-report) | |
# | |
# This script requires: | |
# * awk |
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
#!/bin/bash | |
# OpenVPN Installer | |
# | |
# This installer was designed to work with Ubuntu 14.04. It installs | |
# an OpenVPN server, generates an associated OpenVPN client configuration file, | |
# configures a firewall, and enables automatic security updates. | |
# | |
# Once the installer finishes, the `/root/client.ovpn` file will have been generated. | |
# Download this file to your local machine and open it in an OpenVPN client and you'll |
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
// ==UserScript== | |
// @name Google Translate Tooltip | |
// @namespace steely.wing | |
// @version 1.10 | |
// @description Translates selected text into a tooltip. | |
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html | |
// @copyright 2014, Wing Leong (http://steelywing.iblogger.org/) | |
// @include * | |
// @require http://code.jquery.com/jquery-2.1.0.min.js | |
// @grant GM_getValue |
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
# Copied from http://ttaportal.org/wp-content/uploads/2012/10/7-Reallocation-using-LVM.pdf | |
## | |
## Showing the problem: need to reallocate 32GB from /dev/mapper/pve-data to /dev/mapper/pve-root | |
## | |
df -h | |
# Filesystem Size Used Avail Use% Mounted on | |
# /dev/mapper/pve-root 37G 37G 0 100% / | |
# tmpfs 2.0G 0 2.0G 0% /lib/init/rw |
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
function draw() { | |
image(video, 0, 0, width, height); | |
// We can call both functions to draw all keypoints and the skeletons | |
drawKeypoints(); | |
drawSkeleton(); | |
} |
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
#/bin/bash | |
## taking.kr (webmaster@taking.kr) | |
## 2019-06-11 | |
########################################### | |
read -p "hostname (ex taking.kr): " uhost | |
read -p "new username: " uname | |
read -p "$uname's Password: " upasswd | |
encrypt_pass=$(perl -e 'print crypt($ARGV[0], "password")' $upasswd) | |
############ nameserver setting ############### |
OlderNewer