Skip to content

Instantly share code, notes, and snippets.

View sjackman's full-sized avatar
🍁

Shaun Jackman sjackman

🍁
View GitHub Profile
@fnichol
fnichol / README.md
Created March 12, 2011 20:52
Download a cacert.pem for RailsInstaller

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)

@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
@fperez
fperez / ipython-0.0.1.py
Created January 8, 2012 21:05
IPython 0.0.1, a simple script to be loaded as $PYTHONSTARTUP: of historical interest only...
#!/usr/bin/env python
"""
Interactive execution with automatic history, tries to mimic Mathematica's
prompt system. This environment's main features are:
- Numbered prompts (In/Out) similar to Mathematica. Only actions that produce
output (NOT assingments, for example) affect the counter and cache.
- The following GLOBAL variables always exist (so don't overwrite them!):
_p: stores previous result which generated printable output.
@nickloman
nickloman / genbank_to_tbl.py
Created May 11, 2012 16:10
genbank_to_tbl.py
# requires biopython
# run like:
# genbank_to_tbl.py "my organism name" "my strain ID" "ncbi project id" < my_sequence.gbk
# writes seq.fsa, seq.tbl as output
import sys
from copy import copy
from Bio import SeqIO
def find_gene_entry(features, locus_tag):
@willurd
willurd / web-servers.md
Last active May 6, 2024 09:12
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@rchikhi
rchikhi / alg1-ropebwt2.txt
Last active August 29, 2015 14:04
Illustration of Algorithm 1 in RopeBWT2 article
This document is a partial presentation of the RopeBWT2 pre-print
http://arxiv.org/abs/1406.0426
It is the transcript of a presentation made within the Medvedev group at Penn State
in July 2014. It focuses on illustrating some notions from the methods, and
illustrating and proving Algorithm 1. While this document does not cover the main
contribution of the RopeBWT2 paper, I hope it can be helpful towards understanding
the theoretical foundations that led to Algorithms 2 and 3.
@jennybc
jennybc / 2014-10-12_stop-working-directory-insanity.md
Last active September 23, 2022 04:43
Stop the working directory insanity

There are packages for this now!

2017-08-03: Since I wrote this in 2014, the universe, specifically Kirill Müller (https://github.com/krlmlr), has provided better solutions to this problem. I now recommend that you use one of these two packages:

  • rprojroot: This is the main package with functions to help you express paths in a way that will "just work" when developing interactively in an RStudio Project and when you render your file.
  • here: A lightweight wrapper around rprojroot that anticipates the most likely scenario: you want to write paths relative to the top-level directory, defined as an RStudio project or Git repo. TRY THIS FIRST.

I love these packages so much I wrote an ode to here.

I use these packages now instead of what I describe below. I'll leave this gist up for historical interest. 😆

@hadley
hadley / ds-training.md
Created March 13, 2015 18:49
My advise on what you need to do to become a data scientist...

If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?

I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:

  • Statistical knowledge
  • Programming/hacking skills
  • Domain expertise

Statistical knowledge

@luugiathuy
luugiathuy / slide.html
Created April 6, 2015 10:18
Jekyll layout for reveal.js
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
{% if page.title %}
{{ page.title }} | {{ site.title }}
{% else %}
{{ site.title }}
@satta
satta / add_mrna.lua
Created June 1, 2015 20:48
add_mrna.lua
#!/usr/bin/env gt
function usage()
io.stderr:write(string.format("Usage: %s <GFF annotation>\n" , arg[0]))
os.exit(1)
end
if #arg < 1 then
usage()
end