Skip to content

Instantly share code, notes, and snippets.

View Tag0Mag0's full-sized avatar

Jem Hilton Tag0Mag0

  • Tacoma, Washington
View GitHub Profile
@Tag0Mag0
Tag0Mag0 / wa_or_zcta.geojson
Last active February 4, 2026 01:30
WA/OR ZCTA boundaries (Census 2020, simplified) for Lightdash choropleth map
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Tag0Mag0
Tag0Mag0 / gist:b1998f69303bd5c4e252
Created March 23, 2015 22:20
Postgres Yosemite upgrade
# Yosemite removes essential postgres files after upgrade. Run this to add them back.
mkdir -p /usr/local/var/postgres/{pg_tblspc,pg_twophase,pg_stat_tmp}
@Tag0Mag0
Tag0Mag0 / gist:973a02a6f140ae4e3daf
Created August 28, 2014 14:59
Paperclip symlink
# namespace :paperclip do
# desc "Create symlink"
# task :symlink do
# run "rm -rf #{release_path}/public/system"
# run "mkdir -p #{shared_path}/system"
# run "ln -nfs #{shared_path}/system #{release_path}/public/system"
# end
# end
function csrf() {
$.ajaxSetup({
beforeSend: function(xhr, settings) {
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
@Tag0Mag0
Tag0Mag0 / BouncingImage.js
Last active December 18, 2015 10:49
JavaScript Bouncing Image. Refactored...
/*
* Screen Saver applications
*
*/
var ScreenSaver = function(selector) {
this.element = $(selector);
var offset = this.element.offset();
this.top = offset.top;
this.left = offset.left;