Skip to content

Instantly share code, notes, and snippets.

View natronics's full-sized avatar
💭
Not currenly working on side projects.

Nathan Bergey natronics

💭
Not currenly working on side projects.
View GitHub Profile
@natronics
natronics / Get_Modis.py
Created October 18, 2011 05:21
Get a MODIS image from every day of the year using one of NASA's predefined subsets
#!/usr/bin/env python
# Get the MODIS image from every day of the year using one of NASA's predefined
# subsets
import urllib
import time
baseurl = 'http://rapidfire.sci.gsfc.nasa.gov/subsets/?subset='
subset = 'USA1' # Pacific Northwest
@natronics
natronics / ipython_test
Last active December 20, 2015 14:38
iPython Notebook Example
{
"metadata": {
"name": "ip_gits_test"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@natronics
natronics / Parsing_ADIS_messages.ipynb
Created August 3, 2013 20:40
Converting AIDS data to MKS units
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@natronics
natronics / Theoretical_Rocket.ork
Last active December 20, 2015 14:39
Liquid Rocket back of the envelope
@natronics
natronics / iss-speed.ipynb
Last active December 21, 2015 01:19
How far does the space station go in....
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@natronics
natronics / git-prompt.sh
Last active December 21, 2015 06:29
My simple version of a bash prompt that shows current git info.
## git status in prompt
find_git_status() {
local c_red='\[\e[31m\]'
local c_green='\[\e[32m\]'
local c_clear='\[\e[0m\]'
ps1pc_start="$1"
ps1pc_end="$2"
@natronics
natronics / wifi-packet-speed.ipynb
Created December 18, 2013 07:39
Quick WiFi packets per second calculation for different speeds
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@natronics
natronics / app.py
Last active January 3, 2016 15:29
Simple button on a webpage. Bootstrap for style.
#!/usr/bin/env python
from flask import Flask, render_template, url_for, redirect, request
import os
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), './')
app = Flask(__name__, template_folder=tmpl_dir)
@app.route("/", methods=['GET', 'POST'])
def index():
@natronics
natronics / zenirc
Created March 5, 2014 20:01
An /etc/init.d/ start-stop-daemon for managing https://github.com/zenirc/zenircbot
#!/bin/sh
### BEGIN INIT INFO
# Provides: zenirc
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts zenircbot
# Description: Starts zenircbot
@natronics
natronics / log.html
Last active November 7, 2015 20:54
turn weechat logs into html
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="natronics.org">
<meta name="author" content="Nathan Bergey">
<link href='http://fonts.googleapis.com/css?family=Arvo:400,700|PT+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
<link href="/resources/css/bootstrap.min.css" rel="stylesheet">
<link href="/resources/css/style.css" rel="stylesheet">