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 | |
# | |
# Usage: | |
# ruby ./merge_dna_files.rb file,file1,file2... > merged_file.txt | |
# | |
# Example: | |
# ruby ./merge_dna_files.rb AncestryDNA.txt genome_John_Doe_v4_Full_20170428065226.txt > merged_raw.txt | |
# | |
# Supports 23andMe, AncestryDNA, and Genes for Good 23andMe compatible file formats. | |
# The result will be in 23andMe file format. |
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
# add to .profile | |
set-title () { | |
# If the length of string stored in variable `PS1_BAK` is zero... | |
# - See `man test` to know that `-z` means "the length of STRING is zero" | |
if [[ -z "$PS1_BAK" ]]; then | |
# Back up your current Bash Prompt String 1 (`PS1`) into a global backup variable `PS1_BAK` | |
PS1_BAK="$PS1" | |
fi |
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
git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr |
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
<?php class Sports_Bench_Team_REST_Controller extends WP_REST_Controller { | |
/** | |
* Register the routes for the objects of the controller. | |
*/ | |
public function register_routes() { | |
$namespace = 'sportsbench'; | |
$base = 'teams'; | |
register_rest_route( $namespace, '/' . $base, array( | |
array( |
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
<?php | |
function testPerformance($name, Closure $closure, $runs) | |
{ | |
$start = microtime(true); | |
for (; $runs > 0; $runs--) | |
{ | |
$_ = $closure(); | |
} | |
$end = microtime(true); |
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
Example |
I hereby claim:
- I am sanmai on github.
- I am sanmai (https://keybase.io/sanmai) on keybase.
- I have a public key ASAEQqjFdv38mOryXsV-joWg1qDmcWwQr5mtqYaih13nDAo
To claim this, I am signing this object:
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
MAKEFLAGS+=j2 | |
all: | |
@echo $(MAKEFLAGS) |
Ниже изменения которые нужно внести в код из статьи.
NewerOlder