Skip to content

Instantly share code, notes, and snippets.

View jcanfield's full-sized avatar
💭
If I do not respond quickly, try me on Twitter at @creativeboulder.

Joshua Canfield jcanfield

💭
If I do not respond quickly, try me on Twitter at @creativeboulder.
View GitHub Profile
@GAS85
GAS85 / aria2c_webUI.md
Last active November 28, 2023 13:41
Aria2 + Ubuntu 18.04 + Apache2 + Web UI
OS: Ubuntu 18.04 Apache/2.4.18 1.0.2g-1ubuntu4.10
Aim: to install Aria2 with WebUI and secure Token.
IP Addr of your Aria2 server is 192.168.0.111
Your local IP network is 192.168.0.0/24

Aria 2

1. Installation

Install aria2 package:

@Fabricio20
Fabricio20 / ReadMe.md
Last active November 7, 2023 04:37
Docker - Nginx + PHP FPM + MariaDB + PhpMyAdmin

Docker

This is a docker-compose template for a lemp stack.

Make sure to change both the root password under the mysql service, and the absolute URI on the phpmyadmin container.
You can also expose phpMyAdmin locally instead of remotely by properly configuring the ports.

Default locations:
(Original) -> (Your server)
/var/www/html -> ./webroot
/etc/nginx -> ./nginx

@jcanfield
jcanfield / racadm-reset-pwd.sh
Last active August 21, 2023 15:33
Reset Password for integrated Dell remote access controller (iDRAC6)
#!/bin/bash
## Synopsis
# Reset the primary password on Dell PowerEdge or any device using iDRAC6
## Usage
# sudo ./racadm-reset-pwd.sh YOURPASS
## NOTE
# Resource- http://www.remotecto.net/2010/10/19/changing-a-drac-password-on-the-command-line-with-racadm/
sudo racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 $1
echo "Plase take note of your password"
@jcanfield
jcanfield / .bash_profile
Created November 25, 2017 02:33 — forked from stephenll/.bash_profile
.bash_profile file on Mac OS X
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
@leomao
leomao / watchsync.sh
Last active April 23, 2023 10:21
Watch file changes and sync two directories (to remote via ssh)
#!/bin/bash
#
# Sync local directory to remote directory.
#
# Modified by: Leo Mao
# Modified from: https://gist.github.com/evgenius/6019316
#
# Requires Linux, bash, inotifywait and rsync.
#
# To avoid executing the command multiple times when a sequence of
@insane-dev
insane-dev / .bash_aliases
Created July 9, 2017 15:02
Commonly used bash aliases
#!/bin/bash
# Colors
RED='\033[0;31m'
BLACK='\033[0;30m'
DARK_GRAY='\033[1;30m'
LIGHT_RED='\033[1;31m'
GREEN='\033[0;32m'
LIGHT_GREEN='\033[1;32m'
BROWN_ORANGE='\033[0;33m'
@intfrr
intfrr / new-macos-setup.sh
Created June 28, 2017 06:14
Things to setup/install on a new macOS
#!/bin/bash
# change default shell to zsh (asks for password)
chsh -s /bin/zsh
# install xcode command line tools
xcode-select --install
# download my custom .zshrc
curl https://gist.githubusercontent.com/simonhaenisch/382eab0cfa3435dad7e177a49fe198fc/raw/.zshrc > ~/.zshrc
@jcanfield
jcanfield / rename-files_to-folder.sh
Last active June 11, 2017 00:23
Rename files in a folder to match folder name (useful for htpc usage)
#!/bin/bash
# SYPOPSIS: Rename files in folder to match folder.
# CREDIT: Unamed user on superuser or superadmin. If you find this, let me know and I will add you to the credits.
# UPCOMING: Allow for secondary input such as `rename-files-to-folder $MOVIENAME` so not to rename all movies in directory just one or two.
find * -type f -maxdepth 1 | while read file
do
dirname="$(dirname "$file")"
new_name="${dirname##*/}"
file_ext=${file##*.}
@fibergames
fibergames / dnsupdater.sh
Last active January 10, 2022 13:21
DigitalOcean dynamic DNS updater script for your subdomain
#!/bin/bash
# Created by fibergames.net // Loranth Moroz // v.0.5
# Required tools to run this script as is: curl (https://curl.haxx.se/) & jq (https://stedolan.github.io/jq/)
# This only works for Digitalocean - 10$ credit referral link: https://m.do.co/c/fed75101475f
# Edit token, domain, subdomain to fit your needs
# Substitute ipinfo.io with your own ip-checker e.g. ipecho.net/plain
# This is to be used with crontab -> example entry to run it every 3hours:
# 0 */3 * * * sh /path/to/script/dnsupdater.sh
# Don't forget to make it executable: chmod +x /path/to/script/dnsupdater.sh