- Creating an account
- It can be helpful to use a recognizable username.
- May want to separate your personal account from your work account.
- Associate your work email with account to get a free micro plan:
- Docs
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
use strict; | |
use warnings; | |
use Genome; | |
use Devel::Size qw(size total_size); | |
use List::Util qw(sum); | |
use Scalar::Util qw(weaken); | |
my $list = []; |
I translated the Go example to Perl by making simple syntax transformations:
- Printing is done with
say
instead offmt.Println
. - Variables have a sigil that define their "type", for example,
$a
instead ofa
. - Address of a variable is return with
\
instead of&
. - References/Pointers are dereferenced with
$
instead of*
. - Comments are made with
#
instead of//
. - Perl requires semicolons.
Here's the program:
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 Sorter; | |
use strict; | |
use warnings; | |
my @chromosome = (1..22, 'X', 'Y', 'MT'); | |
# don't leave it up to humans unless you need to! | |
sub index_of { | |
my $i = 0; |
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
# Brett Terpstra 2014 | |
# <http://brettterpstra.com> | |
# | |
# tmux wrapper | |
# tm session-name [window-name] | |
# Names can be partial from the beginning and first match will connect. | |
# If no match is found a new session will be created. | |
# If there's a second argument, it will be used to attach directly to a | |
# window in the session, or to name the first window in a new session. | |
tm() { |
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
_tm_complete() { | |
local rx | |
local token=${COMP_WORDS[$COMP_CWORD]} | |
local IFS=$'\t' | |
local words | |
if [ $COMP_CWORD -eq 1 ]; then | |
words=$(tmux -q list-sessions 2> /dev/null | cut -f 1 -d ':' | tr "\n" " " | sed 's/ $//') | |
fi | |
if [ $COMP_CWORD -eq 2 ]; then | |
words=$(tmux list-windows -t ${COMP_WORDS[1]} 2> /dev/null | awk '{print $2}' | tr -d '*-' | tr "\n" " " | sed 's/ $//') |
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
_tm_complete() { | |
COMPREPLY=() | |
local SESSIONS=$(tmux list-sessions | cut -f 1 -d :) | |
if [ ${#COMP_WORDS[@]} -eq 2 ]; then | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
COMPREPLY=($(compgen -W "$SESSIONS" -- $cur)) | |
fi | |
} | |
complete -F _tm_complete tm |
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
diff --git a/pom.xml b/pom.xml | |
index 20c90d9..e496549 100644 | |
--- a/pom.xml | |
+++ b/pom.xml | |
@@ -22,11 +22,11 @@ limitations under the License. | |
<groupId>com.googlesource.gerrit.plugins.singleusergroup</groupId> | |
<artifactId>singleusergroup</artifactId> | |
<packaging>jar</packaging> | |
- <version>1.0-SNAPSHOT</version> | |
+ <version>1.0</version> |
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
diff --git a/tools/maven/fake_pom.xml b/tools/maven/fake_pom.xml | |
index a531200..7388785 100644 | |
--- a/tools/maven/fake_pom.xml | |
+++ b/tools/maven/fake_pom.xml | |
@@ -22,6 +22,10 @@ | |
</build> | |
<pluginRepositories> | |
<pluginRepository> | |
+ <id>gerrit-maven</id> | |
+ <url>https://gerrit-maven.commondatastorage.googleapis.com</url> |
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
diff --git a/github-oauth/pom.xml b/github-oauth/pom.xml | |
index f3acf76..3263ac3 100644 | |
--- a/github-oauth/pom.xml | |
+++ b/github-oauth/pom.xml | |
@@ -65,7 +65,7 @@ limitations under the License. | |
<dependency> | |
<groupId>com.google.gerrit</groupId> | |
<artifactId>gerrit-plugin-api</artifactId> | |
- <version>${project.version}</version> | |
+ <version>2.8</version> |