Skip to content

Instantly share code, notes, and snippets.

Joshua Canfield jcanfield

Block or report user

Report or block jcanfield

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jcanfield /
Last active Dec 27, 2017
Reset Password for integrated Dell remote access controller (iDRAC6)
## Synopsis
# Reset the primary password on Dell PowerEdge or any device using iDRAC6
## Usage
# sudo ./ YOURPASS
# Resource-
sudo racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 $1
echo "Plase take note of your password"
jcanfield /
Created Dec 27, 2017 — forked from jxson/ template


At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.


jcanfield /
Created Nov 25, 2017 — forked from intfrr/
Things to setup/install on a new macOS
# 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 > ~/.zshrc
jcanfield / .bash_profile
Created Nov 25, 2017 — forked from stephenll/.bash_profile
.bash_profile file on Mac OS X
View .bash_profile
# ---------------------------------------------------------------------------
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
View colors.conf
color_0 = ffff ffff ffff
color_1 = 4949 4848 3e3e
color_2 = 6666 d9d9 efef
color_3 = 6b6b c7c7 2b2b
color_4 = fdfd 9797 1f1f
color_5 = f9f9 2626 7272
color_6 = 94bc 5925 ffff
color_7 = 7575 7171 5e5e
color_8 = e6e6 dbdb 7474
color_9 = a6a6 e2e2 2e2e
jcanfield / sweep-20170617.log
Created Jun 16, 2017
Sophos CLI `sweep` on MacOS Sierra (Segmentation fault: 11)
View sweep-20170617.log
$ sudo sweep -di -dn /
Sophos Anti-Virus
Version 9.6.1 [Darwin/AMD64]
Virus data version 5.40, May 2017
Includes detection for 13427651 viruses, trojans and worms
Copyright (c) 1989-2017 Sophos Limited. All rights reserved.
System time 13:08:55, System date 16 June 2017
Command line qualifiers are: -di -dn
jcanfield /
Created Jun 11, 2017 — forked from trentm/
Bash function to use the URL shortener on stdin. See <> TODO: pbcopy it too if that command is available
# echo URL | googl
function googl {
local url=$(cat <&0)
set -e pipefail;
echo "{}" \
| json -e "this.longUrl='$url'" \
| curl -sf \
-H 'Content-Type: application/json' -d@- \
| json id
jcanfield /
Created Jun 11, 2017 — forked from wafflesnatcha/
Bash: # Shorten a URL using the Google URL Shortener service (
#!/usr/bin/env bash
# Usage: [URL]
# Shorten a URL using the Google URL Shortener service ( {
[[ ! $1 ]] && { echo -e "Usage: [URL]\n\nShorten a URL using the Google URL Shortener service ("; return; }
curl -qsSL -m10 --connect-timeout 10 \
'' \
-H 'Content-Type: application/json' \
-d '{"longUrl":"'${1//\"/\\\"}'"}' |
jcanfield / .bash_aliases
Created Jun 11, 2017
Bash Aliases for HTPC Linux
View .bash_aliases
### List of Bash Aliases
## Hard Drive and Directory space commands
alias ls-space='echo "Displaying Disk space used per directory..." && du -slh * | sort -h'
alias ls-hdspace='echo "Displaying Hard Drive space used and available" && df -H && echo "Script complete. Press Enter to continue"'
jcanfield /
Last active Jun 11, 2017
Rename files in a folder to match folder name (useful for htpc usage)
# 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
dirname="$(dirname "$file")"
You can’t perform that action at this time.