# PowerShell
go run `
-ldflags="
-X 'main.version=$(git name-rev --tags --name-only --always --no-undefined $(git rev-parse HEAD))' `
-X 'main.commitInfo=$(if (git status --porcelain=v2 --untracked-files=no) {Write-Output "*"} else {Write-Output "clean"})' `
-X 'main.buildTime=tomorrow.afternoon'" `
.\playground\versionInject\main.go
This file contains hidden or 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
python .\aws\test_templateIteration.py | |
Outputs: | |
Output0: | |
Description: Output0 | |
Value: Output0 | |
Output1: | |
Description: Output1 | |
Value: Output1 | |
Output2: | |
Description: Output2 |
This file contains hidden or 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 | |
aws --no-verify-ssl ssm get-parameters-by-path --path /aws/service/ami-amazon-linux-latest | |
aws --no-verify-ssl ssm get-parameters-by-path --path /aws/service/ami-amazon-linux-latest --query 'Parameters[?Name==`/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-x86_64-ebs`]' | |
aws --no-verify-ssl ssm get-parameters-by-path --path /aws/service/ami-amazon-linux-latest --query 'Parameters[]|[?contains(Name, `ami-amazon-linux-latest/amzn2`)]' | |
aws --no-verify-ssl ssm get-parameters-by-path --path /aws/service/ami-amazon-linux-latest --query 'Parameters[]|[?contains(Name, `ami-amazon-linux-latest/amzn2`)]|[?Value==`ami-09693313102a30b2c`]' | |
aws --no-verify-ssl ssm get-parameters-by-path --path /aws/service/ami-amazon-linux-latest --query 'Parameters[]|[?contains(Name, `ami-amazon-linux-latest/amzn2`)]|[?Value!=`ami-09693313102a30b2c`]' | |
aws --no-verify-ssl ssm get-parameters-by-path --path /aws/service/ami-amazon-linux-latest --query 'Parameters[]|[?contains(Name, `ami-amazon-linux-latest/amzn2`)]| |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |
This file contains hidden or 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
WITH | |
sel AS (SELECT id, key, value FROM labels WHERE (key = 'sequencing_strandness' AND value = 'paired-end')), | |
ins AS ( | |
INSERT INTO "labels"(key, value) | |
SELECT key, value | |
WHERE NOT EXISTS (SELECT 1 FROM sel) | |
RETURNING "id", key, value | |
) | |
SELECT * FROM ins UNION ALL SELECT * FROM sel | |
; |
This file contains hidden or 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
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### | |
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget. | |
### You can download all the binaries one-shot by just giving the BASE_URL. | |
### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
### Script is updated for every JDK release. | |
### Features:- | |
# 1. Resumes a broken / interrupted [previous] download, if any. | |
# 2. Renames the file to a proper name with including platform info. |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
== 2017-06-23 07:58:18,322 easyblock.py:262 INFO This is EasyBuild 3.2.1 (framework: 3.2.1, easyblocks: 3.2.1) on host ip-10-4-79-235.localdomain. | |
== 2017-06-23 07:58:18,322 easyblock.py:268 INFO This is easyblock EB_R from module easybuild.easyblocks.r.r (/apps/prod/easybuild/software/EasyBuild/3.2.1/lib/python2.7/site-packages/easybuild_easyblocks-3.2.1-py2.7.egg/easybuild/easyblocks/r/r.pyo) | |
== 2017-06-23 07:58:18,323 easyblock.py:753 INFO Build dir set to /apps/prod/easybuild/build/R/3.4.0/foss-2015a-bare.perftest2 | |
== 2017-06-23 07:58:18,323 easyblock.py:792 INFO Software install dir set to /apps/prod/easybuild/software/R/3.4.0-foss-2015a-bare.perftest2 | |
== 2017-06-23 07:58:18,323 easyblock.py:797 INFO Module install dir set to /apps/prod/easybuild/modules/all | |
== 2017-06-23 07:58:18,323 easyblock.py:247 INFO Init completed for application name R version 3.4.0 | |
== 2017-06-23 07:58:18,323 easyblock.py:2508 INFO Obtained application instance of for R (easyblock: None) | |
== 2017-06-23 07:58:18,324 build_log.py:22 |
This file contains hidden or 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
import csv | |
import gzip | |
import os.path as path | |
for obj in fileObjects: | |
fObj = gzip.GzipFile(fileobj=obj, mode='rb') | |
csvWriter.writerow((path.basename(obj.name), sum(itertools.imap(bool, fObj)))) |
This file contains hidden or 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
// Unsupported Pattern because of negative look-ahead | |
// PATTERN = "(.*?)((BI)-(\w+)-(\d{4}-\d{4}-\d{4}(?!-\d{4})))" | |
// Workaround? | |
for _, line := range lines { | |
// If we have 3 digit groups we found a candidate! | |
if match, _ := regexp.MatchString("(.*?)((BI)-(\w+)-(\d{4}-\d{4}-\d{4}", text); match == true { | |
// But if we have 4 digit groups this shouldn't be handled! | |
// This is what the negative lookahead would prevent in the first place | |
if match, _ := regexp.MatchString("(.*?)((BI)-(\w+)-(\d{4}-\d{4}-\d{4}-\d{4}", text); match == true { |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"log" | |
"sync" | |
) | |
var ( | |
wg sync.WaitGroup |