Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Tiffany White twhite96

🏠
Working from home
Block or report user

Report or block twhite96

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
@twhite96
twhite96 / bs4.py
Created Oct 18, 2018 — forked from fffaraz/bs4.py
Python YouTube Playlist Link Collector
View bs4.py
from bs4 import BeautifulSoup
import requests
def getPlaylistLinks(url):
sourceCode = requests.get(url).text
soup = BeautifulSoup(sourceCode, 'html.parser')
domain = 'https://www.youtube.com'
for link in soup.find_all("a", {"dir": "ltr"}):
href = link.get('href')
if href.startswith('/watch?'):
View gist:69687ae11ea997abb29f93a6bf8718bc
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@twhite96
twhite96 / github_gpg_key.md
Created Aug 4, 2018 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)
View github_gpg_key.md

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# Mac
View hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
@twhite96
twhite96 / Eyeballing-This.md
Created Jun 9, 2018 — forked from zcaceres/Eyeballing-This.md
Understanding Binding and 'this' in Javascript
View Eyeballing-This.md

How to Eyeball Your ‘This’ Context in Javascript

The early programmer struggles with the Javascript keyword this. But understanding your this context is easier than it seems.

This is all about where a function is invoked. Often, early programmers worry about where the function was declared. Perhaps the function was declared in a specific file or a particular object. Surely this changes it's this!

Nope.

To understand this, we need to see where it is invoked. Nothing else matters, with one exception which we'll cover in a moment.

@twhite96
twhite96 / nokogiri_install
Created Mar 21, 2018 — forked from sobstel/nokogiri_install
nokogiri -> ERROR: cannot discover where libxml2 is located on your system
View nokogiri_install
# `ERROR: Error installing nokogiri:
# ERROR: Failed to build gem native extension.
#
# current directory: /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.0/ext/nokogiri
# /usr/local/var/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170103-68488-r71c9j.rb extconf.rb --with-xml=/usr/local/Cellar/libxml2/ --use-system-libraries
# checking if the C compiler accepts ... yes
# checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
# Building nokogiri using system libraries.
# ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.
# *** extconf.rb failed ***
@twhite96
twhite96 / README.md
Created Feb 27, 2018 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods
View README.md

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
View gist:53f7ac297a561d74871d394146db4e7f

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@twhite96
twhite96 / organize-photos.py
Created Feb 2, 2018 — forked from cliss/organize-photos.py
Photo management script. This script will copy photos from "~/Pictures/iPhone Incoming" into a tree the script creates, with folders representing month and years, and photo names timestamped. Completely based on the work of the amazing Dr. Drang; see here: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ You can see more…
View organize-photos.py
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################
@twhite96
twhite96 / switch-to-rbenv.md
Created Nov 19, 2017 — forked from traumverloren/switch-to-rbenv.md
Switch from RVM to rbenv
View switch-to-rbenv.md

Switch from RVM to rbenv:

Get Rid of RVM if it's installed:

rvm implode

Cleanup your .bash_profile/.bashrc/.zshrc file to remove RVM from the path:

You should have something like this left from RVM. Delete it from the file. ``[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"```

You can’t perform that action at this time.