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 perl | |
use strict; | |
use warnings; | |
my $name = {}; | |
my @cmd = `last`; | |
for (reverse @cmd) { | |
next if $_ =~ /wtmp|^\s+/; | |
my ($user, undef, $from, $w, $m, $d, $t) = split /\s+/; |
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 perl -w | |
use strict; | |
my $fh; | |
open $fh, '<', $ARGV[0]; | |
while (my $line = <$fh> ) { | |
if ( $line =~ /www\.uniprot\.org\/uniprot\/(\w+)/){ | |
print $1, "\n"; | |
} |
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 perl | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
my $file = './list'; | |
open my $fh, '<', $file or die "$!"; | |
open my $out, ">>", "get_seq.fa" or die "$!"; | |
while (my $id=<$fh>) { |
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
{ i=$1; | |
var[i]++ | |
} | |
END{ for (i in var) { | |
print i, var[i] } | |
} |
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
(defun perltidy-region () | |
"Run perltidy on the current region." | |
(interactive) | |
(save-excursion | |
(shell-command-on-region (point) (mark)"perltidy -q" nil t))) | |
(defun perltidy-defun() | |
"Run perltidy on the current defun." | |
(interactive) | |
(save-excursion (mark-defun) | |
(perltidy-region))) |
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
tell application "System Events" | |
tell current location of network preferences | |
set VPNservice to service "VPN" -- name of the VPN service | |
if exists VPNservice then connect VPNservice | |
end tell | |
end tell |
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
if ( -x `which zsh` ) then | |
exec zsh | |
else if ( -x `which tcsh` ) then | |
exec tcsh | |
endif |
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
bindkey -e | |
# pager | |
export LESS='--LONG-PROMPT' | |
#allow tab completion in the middle of a word | |
setopt COMPLETE_IN_WORD | |
#keep background processes at full speed | |
setopt NOBGNICE | |
# Core size | |
limit coredumpsize 0 | |
# restart running processes on exit |
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 perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
open my $fh, '<', $ARGV[0] or die; | |
local $/ = undef; |
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 perl | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
if ( scalar @ARGV != 1) { | |
die "Usage: perl $0 input.newick\n"; | |
} |
OlderNewer