Skip to content

Instantly share code, notes, and snippets.

View carlthewebmaster's full-sized avatar

Carl Leubsdorf, Jr. carlthewebmaster

View GitHub Profile
@carlthewebmaster
carlthewebmaster / smallerversion.php
Created February 17, 2012 01:25
Show only author's articles
// hide articles from contribs who don't own them
function show_author_posts_only($query) {
global $user_level;
if($query->is_admin && $user_level < 5) {
global $user_ID;
$query->set('author', $user_ID);
unset($user_ID);
}

On April 23 and 24 a group of NCBI computer scientists, subject matter experts and customer service representatives conducted an in-house tool building exercise focused on building a prototype “what’s in my tube” workflow. This event was an attempt at converting the lessons learned from the January virus hackathon into a prototype tool that strings together the disparate computational steps used in the hackathon into a single, modular pipeline that sequentially analyzes the content of user provided next generation sequencing data.

The pipeline was built into a stand-alone Jupyter notebook interface that allows users to see and edit analysis parameters and view graphic displays of results.

While the April event resulted in the basic coding of the pipeline and an initial (MVP) approach to how to run the pipeline in GCP, work remains, particularly in fleshing out effective ways to host and run Jupyter Notebooks on GCP (including access to BLAST, scaling architecture, and visualizations). By the end of the two

$Path="HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$proxyServer = Get-ItemProperty -path $Path ProxyServer -ErrorAction SilentlyContinue
if([string]::IsNullOrEmpty($proxyServer)){
Set-ItemProperty -path $Path ProxyEnable -value 1
Set-ItemProperty -path $Path ProxyServer -Value "localhost:3128"
Write-Host "Proxy is enabled"
}
else {
@carlthewebmaster
carlthewebmaster / ls-to-dig.sh
Created December 14, 2013 15:52
DNS Dump from list of domains.
ls | xargs -L1 dig @ns1.mediatemple.net -t ANY > all-dns.txt
root=mygmailusername@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=mygmailusername@gmail.com
AuthPass=mypassword
UseSTARTTLS=YES
@carlthewebmaster
carlthewebmaster / annotum-via-wp-cli.sh
Last active December 21, 2015 16:09
Install Annotum on a WordPress site using wp-cli. Optionally import demo content from demo.annotum.org.
#
# annotum via wp-cli
#
# If these steps work, code by @solvitor (http://solvitor.com)
# If not, author is unknown
#
# You'll need to install wp-cli (http://wp-cli.org) and
# set up your (empty, blank) database first. Here, wordpress with user wordpress
#
# Then follow these steps from your web root
Mercury Mail tip:
To use Gmail or your ISP's email server with mercury mail, you need to
configure your mercury.ini's MercuryC section as shown below.
Note that the "Host:", "Server_Port" "SMTP_Username" and "SMTP_Password"
need to be correct for YOUR SPECIFIC email provider or ISP. You can usually
find this information in your ISP's support pages under "mail client setup".
Also note that 'path\to\' below indicates the path to YOUR MercuryMail setup.
@carlthewebmaster
carlthewebmaster / gem_install.sh
Created January 25, 2013 18:18
For setting up Gem installation under $HOME
#!/bin/bash
mkdir -p $HOME/lib/ruby/gems #containing folder
# assign new folder to GEM_HOME and write it to your bash_profile to be executed at login.
echo 'export GEM_HOME=$HOME/lib/ruby/gems' >> .bashrc
echo 'PATH=$PATH:$GEM_HOME/bin' >> .bashrc
@carlthewebmaster
carlthewebmaster / .bashrc
Last active December 10, 2015 12:09
shell script to run arch linux on ChromeOS, based on https://gist.github.com/4140706
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
# Put your fun stuff here.
if uname -a | grep -q SAMSUNG ; then
@carlthewebmaster
carlthewebmaster / initial-filtered-content.xml
Created February 1, 2012 20:50
Content initially stored in post_content_filtered after Annotum xml import, and content after first save
<sec xmlns:xlink="http://www.w3.org/1999/xlink"><title>Lorem Ipsum</title>
<p>Autem Apolloni figitur acquievit sed quod non potentiae falsa namque quaequae promittunt sed haec. Coniunx rex ut libertatem adhuc dicente sicut gaudio hoc Apollonius mihi cum. Bene accidentium in fuerat se sed quod ait Cumque hoc ait regem Boreas quam dolore. Item filiam in modo ad per animum pares terris sidera unam.<xref ref-type="bibr" rid="ref1">1</xref></p>
<p>Litus vita Apolloni codicellos pedes Dianae non ait:</p>
<p><fig><label>Ingens ferro conparuit</label><caption>
<p>Ingens ferro conparuit Tharsiam si mihi Tyrum in rei civibus unde beata quid nobis si non potentiae.<xref ref-type="bibr" rid="ref2">2</xref></p>
</caption>
<media xlink:href="https://chart.googleapis.com/chart?cht=tx&amp;chf=bg,s,FFFFFF00&amp;chco=000000&amp;chl=m(T)%20%3D%20%5Cbegin%7Bcases%7D%200%20%26%20%5Ctext%7B%24T%20%3E%20T_c%24%7D%20%5C%5C%20%5Cbigl(1%20-%20%5B%5Csinh%202%20%5Cbeta%20J%5D%5E%7B-4%7D%20%5Cbigr)%5E%7B%5C!%201%2F8%7D%20%26%20%5Ctext%7B