Skip to content

Instantly share code, notes, and snippets.

View iamh2o's full-sized avatar

(major) john (major) iamh2o

View GitHub Profile
#!/bin/bash
set -ex
gcc_ver=$(gcc --version | head -n 1 | awk '{print $3}')
# Install gcc 4.9 devtoolset
if [[ ! "$gcc_ver" =~ 4\.9\.* ]]; then
sudo yum install epel-release -y
sudo yum install centos-release-scl -y
@iamh2o
iamh2o / search_snpedia.py
Created July 29, 2021 02:24 — forked from knmkr/search_snpedia.py
Example for calling SNPedia API from python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
from wikitools import wiki # https://github.com/alexz-enwp/wikitools
from wikitools import page
def search_snpedia(snp):
"""
http://snpedia.com/index.php/Bulk
@iamh2o
iamh2o / osx-openssh-portable.md
Created July 7, 2021 06:34 — forked from surjikal/macos-openssh-portable.sh
Compile OpenSSH Portable on OSX
brew install openssl

git clone git://anongit.mindrot.org/openssh.git
cd openssh

# ./configure script does not exist, so we have to build it
autoreconf

mkdir dist
@iamh2o
iamh2o / generate_docker_cert.sh
Created July 3, 2021 23:23 — forked from bradrydzewski/generate_docker_cert.sh
Generate trusted CA certificates for running Docker with HTTPS
#!/bin/bash
#
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
#
# See http://docs.docker.com/articles/https/
#
# To start the Docker Daemon:
#
# sudo docker -d \
@iamh2o
iamh2o / log_handler_slack.py
Created June 5, 2021 10:01 — forked from GuillaumeDerval/log_handler_slack.py
A --log-handler-script log script for snakemake that pushes the status to Slack
# License: MIT
import socket
from slacker import Slacker
import datetime
import time
import threading
SLACK_TOKEN = 'xoxb-00000000000-000000000000-000000000000000000000000'
CHANNEL_NAME = "your-channel-on-slack"