Skip to content

Instantly share code, notes, and snippets.

View nathanhamilton's full-sized avatar

Nathan Hamilton nathanhamilton

  • Lumerit Education @lumerit
  • San Antonio, TX
View GitHub Profile
@nathanhamilton
nathanhamilton / add_instructor_to_current_canvas_enrollments.rb
Last active July 16, 2021 19:59
Provide a way that current courses in Canvas that need an instructor added can be easily added from a CSV.
require 'csv'
require 'net/http'
require 'json'
require 'uri'
require 'date'
csv_file = CSV.open('file_location', headers: true)
ACCESS_TOKEN = "populate_before_running"
CANVAS_URL = "populate_before_running"
AUTHORIZATION = "Bearer #{ACCESS_TOKEN}"
As you are probably aware, more and more browsers are forcing ssl on all domains
which is a problem when it comes to using our local development environments. There is also
a rising issue with using `.dev` since our beloved Google will begin selling domains
listed in the `.dev` namespace.
This hinders us from using the ruby gem `Powder` locally which makes development very simple.
They have made an update in -version 0.4.0 that changes all of their development domains from `.dev`
to `.test`. However our ruby suite of applications are setup to be developed on the `.dev` domain space.
Until we can make the changes necessary to account for this, please follow the following steps to downgrade your powder version
or your browser version:
source ~/.profile
function parse_git_branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
// ===== Dependancies =====
var request = require('request');
var storage = require('node-persist');
// var _ = require('underscore');
//start node-persist process
storage.initSync();
//set a ups object with all metrics for comparison
// storage.setItemSync('ups',JSON.stringify({

Keybase proof

I hereby claim:

  • I am nathanhamilton on github.
  • I am ndhamilton (https://keybase.io/ndhamilton) on keybase.
  • I have a public key whose fingerprint is 6626 85D3 2C85 9427 5DB7 F476 0F22 B92B BC6F 8A56

To claim this, I am signing this object:

@nathanhamilton
nathanhamilton / .vimrc
Created August 5, 2016 17:56
My vimrc file
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'thoughtbot/vim-rspec'
Plugin 'wincent/command-t'
Plugin 'kchmck/vim-coffee-script'
@nathanhamilton
nathanhamilton / _disqus_javascript.html.haml
Created February 4, 2015 00:28
This gist addresses the issue of loading Disqus commenting within a Rails app using Turbolinks and AJAX.
%div{id: 'disqus_thread', class: 'disqus'}
:javascript
var disqus_shortname = 'your_disqus_shortname';
var disqus_title = 'your_disqus_title';
var disqus_url = 'your_disqus_url';
if(typeof DISQUS === "undefined"){
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';