Skip to content

Instantly share code, notes, and snippets.

@erikson1970
erikson1970 / kepler.cpp
Last active August 29, 2015 14:21 — forked from progschj/kepler.cpp
#include <iostream>
#include <iomanip>
#include <cmath>
#include <utility>
#include <glm/glm.hpp>
const double G = 6.674e-11; // gravitational constant
const double PI = 3.14159265358979323846;

Keybase proof

I hereby claim:

  • I am erikson1970 on github.
  • I am pepperboat (https://keybase.io/pepperboat) on keybase.
  • I have a public key whose fingerprint is 822C 356A 29B6 037D FA27 249A 0865 2F17 4860 4DF3

To claim this, I am signing this object:

@erikson1970
erikson1970 / gist:e9f3851b69286376bc728c10d1812b0a
Last active August 29, 2017 02:13 — forked from nicholashagen/gist:5306330
HDHomeRun Configuration Command Line

Download Source

#> wget http://download.silicondust.com/hdhomerun/libhdhomerun_20130117.tgz
#> tar zxvf libhdhomerun_20130117.tgz 

Install Tools

@erikson1970
erikson1970 / gist:21549c6787f621558dca64c735542261
Last active September 18, 2017 01:53
Record a program using HDHomerun

Script to record and convert video off HD Homerun

#!/bin/bash
function show_help {
    echo "Usage: $0 -g GO [-v verbose] [-h help] [-c CRF=26 ] [-d duration=3600 ] [-f output_file=capture_] [ -i DeviceID=101176E2 ] [ -n Channel=19 ] [ -o output_dest=/mnt/BigUSBDisk/movies/TV_VARIOUS ] [ -p program=0 ] [ -t title=capture_ ] [ -u tuner=0 ] [ -y delay (secs) to start] ]" >&2
    exit 1
}

# A POSIX variable
OPTIND=1         # Reset in case getopts has been used previously in the shell.
#!/bin/bash
function show_help {
echo "Usage: $0 [-g SSSS [ActionVerb=FOO, GO required to start processing] ] [-v verbose] [-h help] [-a NN [maxAgeMonths=6]] [-b noBackup = False][-c NN maxCRF=30 ] [-e SSS EXT=mov;mpg ] [-d SSSSS backup staging dir [default=based on EXT] ] [-p purge old files [False] ] [-s NN max number of Dim scaling events [5] ]" >&2
exit 1
}
####################################
#reset date values of file after clearing exif tags:
# touch /tmp/foo.txt;find . -type f -iname "*.mov" -print0 | while IFS= read -r -d '' file;do touch -r $file /tmp/foo.txt;exiftool -xmp:credit= "$file";touch -r /tmp/foo.txt "$file";done
####################################
@erikson1970
erikson1970 / eclipseFinder.py
Created September 18, 2017 20:03
Find solar eclipses in the future by looking for matching the Declination and Right-Ascension of the sun and moon
import ephem
import math
def FindEclipes():
DATE='2017/8/21 '
pi=3.14159276
ME = ephem.Moon('2017/8/21 16:48:32')
SE = ephem.Sun('2017/8/21')
InAPass=False
oo=ephem.Observer()
oo.lat='42.293010'

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

#
# https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/LV_create.html
# https://www.ibm.com/support/knowledgecenter/en/SSNW54_1.1.1/com.ibm.kvm.v111.admin/RAIDlogicalvolumeslva.htm
#
sudo vgdisplay
#
#Create Physical Volumes
#
# add three partitions to the unallocated assets under LVM management
sudo pvcreate /dev/sdd1 /dev/sdd2 /dev/sde1 /dev/sde2
@erikson1970
erikson1970 / GitHub-Forking.md
Created November 30, 2017 13:25 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

Interactive Map of Linux Kernel: http://www.makelinux.net/kernel_map/