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
#!/bin/bash
# Favicon and Apple Touch Icon Generator
#
# This bash script takes an image as a parameter, and uses ImageMagick to convert it to several
# other formats used on modern websites. The following copies are generated:
#
# * apple-touch-icon-144x144-precomposed.png
# * apple-touch-icon-114x114-precomposed.png
# * apple-touch-icon-57x57-precomposed.png
@jcanfield
jcanfield / system_update.sh
Created February 14, 2023 02:44 — forked from bmatthewshea/system_update.sh
Ubuntu-Debian APT upgrade script
#!/bin/bash
#
# Brady Shea - 18SEP2020 - conversion of system_update alias to bash script
# https://www.holylinux.net/
#
# Place this script in "/usr/local/sbin/system_update" or similar location under your $PATH
# It needs root permissions (SUDO) to execute.
#
# Change these settings to your liking:
#################################
@jcanfield
jcanfield / webhook-mailer.php
Created June 3, 2012 05:24 — forked from boucher/webhook-mailer.php
Stripe Webhook PHP Example
<?php
// SETUP:
// 1. Customize all the settings (stripe api key, email settings, email text)
// 2. Put this code somewhere where it's accessible by a URL on your server.
// 3. Add the URL of that location to the settings at https://manage.stripe.com/#account/webhooks
// 4. Have fun!
// set your secret key: remember to change this to your live secret key in production
// see your keys here https://manage.stripe.com/account
@jcanfield
jcanfield / .bash_aliases
Created July 10, 2018 19:56 — forked from insane-dev/.bash_aliases
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'
@jcanfield
jcanfield / .bash_profile
Created October 30, 2015 10:55 — forked from natelandau/.bash_profile
Mac OSX Bash Profile - Sections: # 1. Environment Configuration # 2. Make Terminal Better (remapping defaults and adding functionality) # 3. File and Folder Management # 4. Searching # 5. Process Management # 6. Networking # 7. System Operations & Information # 8. Web Development # 9. Reminders & Notes
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@jcanfield
jcanfield / cache.htaccess
Created August 10, 2012 22:49 — forked from kurtpayne/cache.htaccess
.htaccess caching rules
<IfModule mod_mime.c>
# Text
AddType text/css .css
AddType application/x-javascript .js
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType text/plain .txt
AddType text/xml .xml
@jcanfield
jcanfield / aria2c_webUI.md
Created January 31, 2022 10:38 — forked from GAS85/aria2c_webUI.md
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:

195.114.173.153 # ns1.internetia.pl - Netia
195.116.55.69 # ns2.internetia.pl - Netia
8.8.8.8 # google-public-dns-a.google.com - Google
8.8.4.4 # google-public-dns-b.google.com - Google
208.67.222.222 # resolver1.opendns.com - OpenDNS
208.67.220.220 # resolver2.opendns.com - OpenDNS
208.67.222.220 # resolver3.opendns.com - OpenDNS
208.67.220.222 # resolver4.opendns.com - OpenDNS
149.156.1.3 # nms.cyf-kr.edu.pl
149.156.4.11 # info.cyf-kr.edu.pl
@jcanfield
jcanfield / tmux-cheatsheet.markdown
Last active July 27, 2018 10:32 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Cheatsheet for `tmux`

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jcanfield
jcanfield / dnsupdater.sh
Created July 15, 2018 04:38 — forked from fibergames/dnsupdater.sh
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