This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "date" | |
sun_burn_out_date = DateTime.new(6999999999, 12, 31, 23, 59, 59) | |
diff = sun_burn_out_date - DateTime.now | |
seconds = (diff * 34 * 60 * 60).to_i | |
printf("%018d\n", seconds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns webui.code | |
(:require | |
[dmohs.react :as r] | |
)) | |
(r/defc App | |
{:render | |
(fn [{:keys [this state]}] | |
[:div {} | |
"Hello, World!"])}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
app: | |
image: hseeberger/scala-sbt | |
stdin_open: true | |
tty: true | |
ports: | |
- "5051:5051" | |
working_dir: /w | |
volumes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'json' | |
require 'jwt' | |
require 'typhoeus' | |
service_account_data_file_name = ARGV.shift | |
if not service_account_data_file_name | |
STDERR.puts "Specify service account file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns com.mohsdev.groceries.status | |
(:require | |
[com.mohsdev.groceries.server :as server] | |
[com.mohsdev.groceries.utils :as utils :refer [rlog jslog cljslog]] | |
[com.mohsdev.groceries.env :as env] | |
[dmohs.react :as react] | |
) | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS=$'\n\t' | |
set -euxo pipefail | |
BASE="$1" | |
SRC="$2" | |
DST="$3" | |
if [[ ! -e "$BASE" ]]; then | |
>&2 echo "Base path does not exist: $BASE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS=$'\n\t' | |
set -euox pipefail | |
CNAME="$1" | |
FILE_PATH="$2" | |
TMPFILE="$(mktemp)" | |
docker exec "$CNAME" cat "$FILE_PATH" > "$TMPFILE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS=$'\n\t' | |
set -euxo pipefail | |
mkdir /etc/ssl/certs/docker | |
mkdir /etc/ssl/certs/docker/server | |
mkdir /etc/ssl/certs/docker/client | |
cd /etc/ssl/certs/docker | |
echo "$(uuidgen)" > keypass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task M2 { | |
File ref_fasta | |
File ref_fasta_dict | |
File ref_fasta_fai | |
File tumor_bam | |
File tumor_bai | |
File normal_bam | |
File normal_bai | |
File intervals | |
String m2_output_vcf_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onLogin(user) { | |
if (user.nihAccountLink.isActive) { | |
if (user.nihAccountLink.lastLogin < _24HoursAgo && user.nihAccountLink.expireTime > _24HoursFromNow) { | |
user.nihAccountLink.expireTime = _24HoursFromNow; | |
} | |
} | |
} | |
function onNihAccountLinkSuccess(user) { | |
user.nihAccountLink.lastLogin = now; |