Skip to content

Instantly share code, notes, and snippets.

View Sonictherocketman's full-sized avatar

Brian Schrader Sonictherocketman

View GitHub Profile
@demorest
demorest / uvw_compare.py
Last active September 27, 2023 21:56
Interferometric UVW calculation using astropy
import numpy as np
import astropy.coordinates as coord
import astropy.time
import astropy.units as u
# Can do this to get updated IERS B values into astropy
from astropy.utils import iers
from astropy.utils import data
iers_b = iers.IERS_B.open(data.download_file(iers.IERS_B_URL, cache=True))
iers_auto = iers.IERS_Auto.open()
@mark47
mark47 / datatables.datetime-flex.js
Last active March 18, 2019 06:18
Plugin for jQuery Datatables sorting of US-style date and time. Requires month, day and year. Time is optional and can be in 12 or 24 hour formats. Properly parses mm/m, dd/d and yyyy/yy.
/**
* DataTables plug-in to handle U.S.-style dates. Requires month day year.
* Time is optional and can be in 12 or 24 hour formats.
* Properly parses mm/m, dd/d and yyyy/yy.
*
* Based on original datetime-us plugin by Kevin Gravier.
*
* @name Flexible US Datetime
* @summary Sort dates and times in US mm/dd/yyyy with optional time.
* @author Mark Stewart
@aras-p
aras-p / preprocessor_fun.h
Last active June 21, 2024 12:20
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@floer32
floer32 / centos_python_env_setup
Last active May 2, 2022 03:47 — forked from stantonk/doit
CentOS 6: Install Python 2.7.4, pip, virtualenv, and virtualenvwrapper on CentOS (plus some bonus items at the end if you want). You should probably run with `sudo`.
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum -y install zlib-devel # gen'l reqs
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o