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
@jcanfield
jcanfield / _generated_background_page.html
Created May 9, 2017 13:45
Google Chrome Extension: Honey (Refer Ext errors with: This extension failed to modify the request header "Referer" of a network request because the modification conflicted with another extension (Honey).)
<!DOCTYPE html>
<body>
<script src="h0.js"></script>
@jcanfield
jcanfield / sources.list
Created April 27, 2017 17:19
Ubuntu 16.10 Sources for APT
# Ubuntu Sources List Generator
>>> NEWS: Now available on SSL
>>> Replace your /etc/apt/sources.list with the following one. For adding GPG keys of new repos, see instruction (if available) in the sources.list below itself.
## curl https://repogen.simplylinux.ch/txt/yakkety/sources_dccbf34a40895c1d9b7a7e7d24ee21dbbbccc385.txt | sudo tee /etc/apt/sources.list
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
@jcanfield
jcanfield / index.html
Last active March 29, 2017 02:09
Testing for Joshua Canfield Portfolio
<body>
<div class="LI-profile-badge" data-version="v1" data-size="large" data-locale="en_US" data-type="vertical" data-theme="dark" data-vanity="joshgcanfield"><a class="LI-simple-link" href='https://www.linkedin.com/in/joshgcanfield?trk=profile-badge'>Joshua Canfield</a></div>
<script type="text/javascript" src="https://platform.linkedin.com/badges/js/profile.js" async defer></script>
</body>
@jcanfield
jcanfield / ubuntu-anacrontab.text.sh
Last active February 27, 2017 09:59
[Ubuntu 16.04] Device Information
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root
LOGNAME=root
# These replace cron's entries
@jcanfield
jcanfield / crawl_site
Created January 9, 2017 21:39 — forked from reidransom/crawl_site
Download an entire website with wget
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
@jcanfield
jcanfield / dns-servers_updated-2017.md
Last active June 10, 2023 09:50
DNS Server List for 2015/2017 (courtesy of http://sos.smerwick.com.tw)

List of DNS Servers

'The following is a list of DNS Servers: both, Private and Public.'

DNS Servers

Why does DNS matter?

The Domain Name System (DNS) protocol is an important part of the web's infrastructure, serving as the Internet's phone book: every time you visit a website, your computer performs a DNS lookup. Complex pages often require multiple DNS lookups before they start loading, so your computer may be performing hundreds of lookups a day.

List of Public DNS Servers

jcanfield at schatzbook in ~/.apps
$ curl -fsSL https://raw.githubusercontent.com/Falkor/dotfiles/master/install.sh | bash -s -- --all
=> About to install Falkor's dotfiles from /Users/jcanfield/.dotfiles.falkor.d
[WARNING] Are you sure you want to continue? [Y|n] Submodule '.submodules/Makefiles' (https://github.com/Falkor/Makefiles.git) registered for path '.submodules/Makefiles'
Submodule '.submodules/gitstats' (https://github.com/hoxu/gitstats.git) registered for path '.submodules/gitstats'
Submodule 'oh-my-zsh/custom/plugins/zsh-completions' (https://github.com/zsh-users/zsh-completions) registered for path 'oh-my-zsh/custom/plugins/zsh-completions'
Submodule 'oh-my-zsh/custom/themes/powerlevel9k' (https://github.com/bhilburn/powerlevel9k.git) registered for path 'oh-my-zsh/custom/themes/powerlevel9k'
Submodule 'tests/helpers/assertions' (https://github.com/jasonkarns/bats-assert) registered for path 'tests/helpers/assertions'
Cloning into '/Users/jcanfield/.dotfiles.falkor.d/.submodules/Makefiles'...
C
@jcanfield
jcanfield / update-media-perms.sh
Created November 21, 2016 19:05
Change Media Files & Folder Permissions/ACLs Recusively
#!/bin/bash
# Synopsis: The concept is to allow for a Bash $Variable to quickly name Harddrives & Folders where you store your Media. After re-installation or changes to your OS. sometimes permissions and ownership can be modified the wrong way.
find $1 -type f print0 | xargs -0 chmod -Rc 644 # Change all files recusively to 644
find $1 -type d -print0 | xargs -0 chmod-Rc 755 # Change all directories recursively to 755
chown $USER -R $1 # Change ownership to current user

Unix Command Line Notes

  • Command settings
    • .bashrc
      • Aliases - place the following on a new line in the .bashrc file
        • alias [alias-name]='[alias command(s)]
        • Ex:alias ls='ls -lh'
    • .profile or .bash_profile
  • Add folders to you path
@jcanfield
jcanfield / node-and-npm-in-30-seconds.sh
Created October 27, 2016 03:05 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh