Skip to content

Instantly share code, notes, and snippets.

View dnfehren's full-sized avatar

Dan Fehrenbach dnfehren

View GitHub Profile
@dnfehren
dnfehren / gist:2c625e699f1eb41633b40b86addee1a7
Created March 20, 2019 15:39
timestamped notes file in vim
vim -c ':put =strftime(\"%Y/%m/%d %H:%M:%S %a\")' -c ':put _' -c 'star' __notes.txt
/systeml_project
/.git
.gitignore
Procfile
/requirements
base.txt
requirements.txt
/systeml
manage.py
/forecast
@dnfehren
dnfehren / postgres_install.sh
Created July 31, 2012 16:53
postgres install instructions, not really a shell script
#get rid of anything from a mis-installed version
sudo apt-get --purge remove postgres*
sudo rm -rf /var/lib/postgresql
sudo deluser -remove-all-files postgres
#install the packages
sudo apt-get install postgresql-9.1
sudo apt-get install pgadmin3 phppgadmin
#shutdown postgres database server
@dnfehren
dnfehren / panda_install.sh
Created July 31, 2012 16:52
Panda Project install notes, not really a shell script
#####
#
# After VM is created, before startup
#
#####
###
# Port forwarding for windows host
###
@dnfehren
dnfehren / url_search.java
Created July 12, 2012 13:35
Java URL finder, reads a text file and outputs a csv with identified urls and the number of times the domain appeared.
/* Url Finder by Daniel Fehrenbach August 2009
*
* Notes
*
* regular expression "\\b((https?)://|(www))\\S+" does not handle urls enclosed in parentheses (ie "(http....") used a find+replace in text editor to remove them
*
*
*
* */
@dnfehren
dnfehren / collector_app_examples
Created June 8, 2012 18:27
collector_app_examples
My app.py has a section like this…
```
@app.route(‘new/<collector_choice>’)
def create_new_collector(collector_choice):
identification_template = render_template(‘identify_template.html’)
return render_template(collector_choice + “.html”, bldg_ident=identification_template
```
The identify_template.html looks like…
@dnfehren
dnfehren / gist:1924855
Created February 27, 2012 15:50
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after