Skip to content

Instantly share code, notes, and snippets.

@TylerFisher
TylerFisher / hosting-on-github.md
Last active July 21, 2024 05:51
Basic steps for hosting on Github

Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level
@TylerFisher
TylerFisher / README.md
Last active July 13, 2021 18:48 — forked from onyxfish/README.md
Google Spreadsheets script to generate slugs from a range of cells

This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.

Use it like this!

# A B C
1 a b slug
2 foo baz bing =slugify(A2:B4)
3 bar BAZ
4 FOO baz-bing

Keybase proof

I hereby claim:

  • I am TylerFisher on github.
  • I am tylrfishr (https://keybase.io/tylrfishr) on keybase.
  • I have a public key whose fingerprint is 02CC 8F1D CD3F 9F3E 9043 573E C4F9 D233 89B2 E288

To claim this, I am signing this object:

@TylerFisher
TylerFisher / LICENSE
Last active March 22, 2020 11:26
A basic library and example usage for JavaScript-based Chromecast apps, developed by NPR Visuals for elections.npr.org.
The MIT License (MIT)
Copyright (c) 2014 NPR
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@TylerFisher
TylerFisher / code-structure.js
Created May 21, 2014 17:39
An example of good code structure for Unclass
// all variables I will use
var photosArray;
var photosArrayCounter;
var $visiblePhoto;
// all functions
var changePhoto = function() {
if ($(this).hasClass('next') && photosArrayCounter < photosArray.length) {
@TylerFisher
TylerFisher / april_7_lesson.md
Last active April 7, 2016 18:29 — forked from jeremyjbowers/april_7_lesson.md
The April 7th Class Lecture

April 7th Lesson

Now that we've all had a good face-to-face, we're going to accomplish two things today.

First, we're going to add a new route to your app.py that will let you see a single incident / detainee by clicking on a link from your home page.

Second, we're going to walk through how CSS works and discuss how you might use Materialize to clean up your site's design.

Update your app.py

Current state of your app.py

@TylerFisher
TylerFisher / tally.py
Created December 17, 2015 15:29
Sample agate-based script for tallying the results for the All Songs Considered listeners poll: http://www.npr.org/sections/allsongs/2015/12/16/459822811/poll-results-listeners-pick-their-favorite-albums-of-2015
import agate
data = {}
output = {}
"""
Converts all entries to lowercase for easier matching.
"""
def process_csv():
lowered_list = []
@TylerFisher
TylerFisher / gist:4028737
Created November 7, 2012 00:35 — forked from gotoplanb/gist:4028725
NPR 8-bit without audio
javascript:var%20s%3Ddocument.createElement(%27link%27)%3Bs.rel%3D%27stylesheet%27%3Bs.type%3D%27text/css%27%3Bs.href%3D%27http://jeremygilbert.com/extras/12FA-NPR-8Bit/css/app-8bit.css%27%3Bdocument.body.appendChild(s)%3B
@TylerFisher
TylerFisher / LICENSE
Last active August 29, 2015 14:08
Our elections app relied on a 16x9 slide layout across all devices, regardless of the size of the actual screen. We wrote some tricky CSS and JavaScript to achieve this.
The MIT License (MIT)
Copyright (c) 2014 NPR
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@TylerFisher
TylerFisher / LICENSE
Last active August 29, 2015 14:08
This code will refresh all users on your webpage upon deployment of a timestamp.json file to S3. We used this to deploy hotfixes on election night for elections.npr.org. It requires Fabric (a Python library for running tasks on the command line) and jquery-cookie.js, but could easily be refactored to not.
The MIT License (MIT)
Copyright (c) 2014 NPR
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: