Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt Ralston MatthewRalston

View GitHub Profile
View loadLogger.js
const log4js = require('log4js');
// Accessory configurations for log4js
// Works with log4js >= 2.3.3
// Usage:
//var logger = require('./app/loadLogger').logger; // Default is stderr only
// Alternate (app : file + stderr)
// const loadLog = require('./app/loadLogger');
// var logger = loadLog.log4js.getLogger('app'); // For an express app: stderr + file : logs/application.log)
View schrute.txt
`/+o/.
.+sso+/:oydyo/:-:+shdys/ `-:. `-/+o+/`
`/sdh+/::/::ss:`ymdhyso//hmMNyhNNms+ososys+/-:/shms/`
.+hNNy++oo+/.`.--/osyhdmNNMMMMMMMMMNdsssssoso+hhhhsoo+ymdo.
-smNy/+ymmmmmNNNNMNMMMMMNNNmmNMMMMMMMMMho:///:--shydNMMNdo-sNs`
-hNd+-sNMNdmNMMMNNNMNNNMMMddNMMNNmNMMMMMMNmy+///::/:-:/++ymNNdmMN:
`sNMs`+NMNNNMMMMNNNMMMMMMNmhyso///+ohMmoNMmoo+/::/-:oymNNmsosshdhmMM/
+NMMy`hMMMhyNMNMMNNNMds:-.`-:syddmNMMmyo`+yMMho:..-+//++omMNNNNNNNmdNMs
:mMMMh`yMNdodNNNMNMMMs.+sdmmmmmdhNMMMNhy/..`-syhNmdyssso+/.`:yNMMMMNMNMMMy
:NMNh:-+MMh+mdNNNNNMd.+NNMMMMMMMMmho:-......:--::ohNMMMMMMNmNy/.oNMNmNMNMMMs
@MatthewRalston
MatthewRalston / conky_orange_4k.lua
Created Nov 19, 2017 — forked from anonymous/conky_orange_4k.lua
conky orange 4k resolution config files
View conky_orange_4k.lua
--==============================================================================
-- conky_orange.lua
--
-- author : SLK
-- version : v2011062101
-- license : Distributed under the terms of GNU GPL version 2 or later
--
-- modified: me
-- version : v20171027
-- notes : works on 4k screen. uses conky conf newer >v1.1
@MatthewRalston
MatthewRalston / install.log
Created Oct 29, 2017
Samtools 1.6-1 compilation error in bam_tview_curses.c
View install.log
>yaourt -S samtools
==> Downloading samtools PKGBUILD from AUR...
x .SRCINFO
x .gitignore
x PKGBUILD
wookietreiber commented on 2015-10-25 17:09
Thanks for letting me know, updated pkgrel.
greyltc commented on 2017-05-20 09:46
View cabal-install.stderr
Using gcc for C compiler. If this is not what you want, set CC.
Using /usr/libexec/gcc/xxxx/4.4.7/collect2 instead.
src/Hackage/Security/TUF/Layout/Repo.hs:8:1: error:
Could not find module ‘Distribution.Package’
Perhaps you haven't installed the profiling libraries for package ‘Cabal-2.0.0.2’?
Use -v to see a list of the files searched for.
|
8 | import Distribution.Package
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@MatthewRalston
MatthewRalston / citations.txt
Last active May 10, 2017
Reproducible_citations
View citations.txt
Ioannidis, John PA, et al. "Repeatability of published microarray gene expression analyses." Nature genetics 41.2 (2009): 149-155.
Nekrutenko, Anton, and James Taylor. "Next-generation sequencing data interpretation: enhancing reproducibility and accessibility." Nature Reviews Genetics 13.9 (2012): 667-672.
Peng, Roger D. "Reproducible research in computational science." Science (New York, Ny) 334.6060 (2011): 1226.
Baggerly, Keith. "Disclose all data in publications." Nature 467.7314 (2010): 401.
Van Noorden, Richard. "The trouble with retractions." Nature 478.7367 (2011): 26-28.
Begley, C. Glenn, and Lee M. Ellis. "Drug development: Raise standards for preclinical cancer research." Nature 483.7391 (2012): 531-533.
@MatthewRalston
MatthewRalston / _service.md
Created Apr 7, 2017 — forked from naholyr/_service.md
Sample /etc/init.d script
View _service.md

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
View Hello.rb
partner = Object.new
def my_most_sincere_apology
"I'm sorry for everything that I've done. But when I call you never seem to be home."
end
try:
1000.times do |t|
partner.call(:my_most_sincere_apology)
end
catch e:
@MatthewRalston
MatthewRalston / ml-ruby.md
Created May 5, 2016 — forked from gbuesing/ml-ruby.md
Resources for Machine Learning in Ruby
View ml-ruby.md

Resources for Machine Learning in Ruby

Gems

View hamming_match.py
'''
When you want to match files that only differ by one character: sample_1.fastq.gz sample_2.fastq.gz
'''
def is_hamming_match(seq1, seq2):
if len(seq1) == len(seq2): # The sequences must be of equal length
zipped = zip(seq1, seq2)
is_mismatch = list([c1 != c2 for c1, c2 in zipped])
if sum(is_mismatch) == 1: # The sequences must have only one mismatch
mismatches = list([[c1, c2] for c1, c2 in zipped if c1 != c2])
if mismatches[0] == ['1', '2'] or mismatches[0] == ['2', '1']: # The mismatch must only be the numbers 1 and 2
You can’t perform that action at this time.