Skip to content

Instantly share code, notes, and snippets.

View cory-ko-g's full-sized avatar

cory cory-ko-g

View GitHub Profile
nvm_version:23: no matches found: v*
nvm_version:27: no matches found: v*.*[02468].*
nvm_version:27: no matches found: v*.*.*
nvm_version:27: no matches found: vcurrent*
nvm:116: no matches found: *
59c59,60
< VERSION=`(cd $NVM_DIR; \ls -d v${PATTERN}* 2>/dev/null) | sort -t. -k 2,1n -k 2,2n -k 3,3n | tail -n1`
---
> GET_VERSION="ls -d v${PATTERN}* 2>/dev/null"
> VERSION=`(cd $NVM_DIR; echo ${GET_VERSION} | sh) | sort -t. -k 2,1n -k 2,2n -k 3,3n | tail -n1`
187c188,189
< (cd $NVM_DIR/alias && for ALIAS in `\ls $2* 2>/dev/null`; do
---
> COMMAND="ls $2* 2>/dev/null"
> (cd $NVM_DIR/alias && for ALIAS in `echo ${COMMAND} | sh`; do
#!/usr/bin/env perl
use LWP::UserAgent;
use HTTP::Request::Common qw/POST/;
use strict;
use warnings;
my $xml = _query_xml();
my %form_data = (
"query" => $xml,
@cory-ko-g
cory-ko-g / glinks.pl
Created August 26, 2011 06:48
Access to G-Links via POST method.
% kblast --version
EMBOSS:6.4.0.0 KBWS:1.0.8
#include <stdio.h>
#include <stdlib.h>
#include "emboss.h"
int main (int argc, char **argv) {
AjPSeqall seqall;
AjPSeqout seqout;
AjPSeq seq = NULL;
embInitPV("ctest", argc, argv, "CORY", "1.0.0");
#include <stdio.h>
#include <stdlib.h>
#include "emboss.h"
static AjPStr getUniqueFileName(void);
int main (int argc, char **argv) {
AjPSeqall seqall;
AjPSeqout seqout;
AjPSeq seq = NULL;
>> pmset -g ps
Currently drawing from 'AC Power'
-InternalBattery-0 99%; charged; 0:00 remaining
#!/bin/sh
/usr/bin/pmset -g ps | awk '{ if (NR == 2) print "Batteries:" $2 " Status:" $3 " " $4 " " $5; }' | sed "s/;//g"
Batteries:99% Status:charged 0:00 remaining