Skip to content

Instantly share code, notes, and snippets.

#minute (0-59),
#| hour (0-23),
#| | day of the month (1-31),
#| | | month of the year (1-12),
#| | | | day of the week (0-6 with 0=Sunday).
#| | | | | commands
0 * * * * cd /tmp && wget akofink.com && rm -f index.html
0 * * * * cd /tmp && wget recipes.akofink.com && rm -f index.html
0 * * * * cd /tmp && wget wishlists.akofink.com && rm -f index.html
@akofink
akofink / export.rb
Created August 8, 2014 21:13
export ids
str = Assembly.with_fasta_path.pluck(:id).join("\n")
`echo "#{str}" > valid_assemblies`
Assembly.with_fasta_path.pluck(:id)
cd /var/www/apps/midas/current
RAILS_ENV=staging bundle exec rails console
@akofink
akofink / tree.sh
Last active August 29, 2015 14:04
# Install
brew install tree
# Usage
tree <directory>
# Example
tree ~/dev/rails/midas/config
@akofink
akofink / alter_postgres_databse.sql
Created June 2, 2014 13:24
Alter postgres database name
ALTER DATABASE <db> RENAME to <new_name>
\documentclass[11pt, oneside]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{gensymb}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{siunitx}
\usepackage{upgreek}
.DS_Store
.ruby-version
log
tags
.vim/bundle
.vim_osx/bundle
config/midas.yml
.sass-cache
config/bioassay.yml
config/midas.yml
@akofink
akofink / assignment_participant.rb
Last active December 29, 2015 08:39
A terrible refactoring. I am determining whether to keep HEAD or replace with the changes on e57b0b9.
<<<<<<< HEAD
def get_path
self.assignment.get_path + "/"+ self.directory_num.to_s
=======
def get_path
path = self.assignment.get_path + "/"+ self.directory_num.to_s
return path
>>>>>>> e57b0b9dc61d95788035e82059d753295a800bee
end
development:
adapter: mysql
database: pg_development
username: root
password:
host: localhost
# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.