Skip to content

Instantly share code, notes, and snippets.

View taptapdan's full-sized avatar

Daniel Fiore taptapdan

View GitHub Profile
@taptapdan
taptapdan / badge-hsu-qolt-reviewed.html
Created February 9, 2015 18:06
HSU QOLT Reviewed // Moodle HTML Block Code
<div style="text-align: center;">
<p>
<a href="http://www2.humboldt.edu/elearning/faculty-resources/qolt">
<img style="width: 100%; max-width: 500px; min-width: 150px;" src="http://i.imgur.com/4BVbUpB.png" alt="HSU QOLT Reviewed Badge" />
</a>
</p>
<p>This course has undergone the <a href="http://www2.humboldt.edu/elearning/faculty-resources/qolt">HSU QOLT</a> review process.</p>
</div>
@taptapdan
taptapdan / ssh-remote-host.txt
Last active August 29, 2015 14:23
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
7d:ea:d0:a8:3a:8b:44:27:94:9f:f9:81:83:0e:1b:14.
Please contact your system administrator.
Add correct host key in /Users/fiore/.ssh/known_hosts to get rid of this message.
@taptapdan
taptapdan / jekyll-quick-start-instructions
Created June 18, 2015 19:47
Jekyll Quick Start Instructions
~ $ gem install jekyll
~ $ jekyll new my-awesome-site
~ $ cd my-awesome-site
~/my-awesome-site $ jekyll serve
# => Now browse to http://localhost:4000
@taptapdan
taptapdan / .htaccess
Created June 19, 2015 16:44
Example .htaccess for Drupal 7.38 at Humboldt State University
# Example .htaccess for Drupal 7.38 at Humboldt State University
# Make sure to change RewriteBase to point to your site's location.
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$">
Order allow,deny
@taptapdan
taptapdan / 000-default.conf
Created July 7, 2015 19:46
/etc/apache2/sites-available/000-default.conf
<Directory /var/www/html/>
Options FollowSymLinks
AllowOverride All
</Directory>
@taptapdan
taptapdan / codepen-norerun.css
Created September 1, 2015 19:33
Hide Rerun Button on Codepen Embeds
#rerun-button { display: none; }
@taptapdan
taptapdan / carrier_wave.rb
Last active December 5, 2015 04:23
RailsTutorial Chapter 10 // Configuring CarrierWave to use S3 // config/initializers/carrier_wave.rb
# config/initializers/carrier_wave.rb
if Rails.env.production?
CarrierWave.configure do |config|
config.fog_credentials = {
# Configuration for Amazon S3
:provider => 'AWS',
:aws_access_key_id => ENV['S3_ACCESS_KEY'],
:aws_secret_access_key => ENV['S3_SECRET_KEY'],
:region => ENV['S3_REGION']
@taptapdan
taptapdan / command line
Last active December 5, 2015 04:23
RailsTutorial Chapter 10 // Configuring CarrierWave to use S3 // Setting Heroku Environment Variables
$ heroku config:set S3_ACCESS_KEY=<access key>
$ heroku config:set S3_SECRET_KEY=<secret key>
$ heroku config:set S3_BUCKET=<bucket name>
$ heroku config:set S3_REGION=<bucket region>
@taptapdan
taptapdan / functions.php
Last active December 14, 2015 17:36
Wordpress, Post Formats, Link -- Adding Support to Widgets
// functions.php
add_theme_support( 'post-formats', array( 'link' ) );
@taptapdan
taptapdan / coco.backwoods.brawl.js
Created December 26, 2015 19:17
CodeCombat: Backwoods Brawl Solution
// Stay alive for one minute.
// If you win, it gets harder (and more rewarding).
// If you lose, you must wait a day before you can resubmit.
// Remember, each submission gets a new random seed.
// Determines if Warrior should use cleave
// When?
// - If cleave is ready AND
// - If there are more than 2 enemies within cleave range
this.shouldCleave = function() {