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
#!/usr/bin/env groovy | |
import groovy.json.JsonSlurper; | |
String STATE = "CA"; | |
String CITY = "San_Francisco"; | |
String KEY = "YOUR_API_KEY"; | |
JsonSlurper jsonSlurper = new JsonSlurper(); | |
def jsonData = "http://api.wunderground.com/api/${KEY}/conditions/q/${STATE}/${CITY}.json".toURL().text; | |
def j = jsonSlurper.parseText(jsonData); | |
println """ |
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 | |
for i in *.CR2; | |
do | |
fil=${i%%.CR2} | |
dcraw -v -o 2 -c -q 0 -w -H 8 -b 4 $i | cjpeg -quality 75 > $fil.jpg; | |
convert $fil.jpg -resize 1280x1024 $fil.jpg; | |
done |
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
#!/usr/bin/env perl | |
# | |
# Analyze CSV files in order to see only the columns you specify. | |
# Display the headers of the CSV in order to get column names and/or numbers. | |
# Use the column names/numbers in order to only display those columns to standard out. | |
# | |
use strict; | |
use Getopt::Std; | |
my %options=(); |
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
#!/opt/perl514/bin/perl | |
############################################ | |
# Example input | |
# MRKT306; ACCT205/206; MGMT320/375/380/420; FNBK306 | |
# | |
# Example output | |
# MRKT306,ACCT205,ACCT206,MGMT320,MGMT375,MGMT380,MGMT420,FNBK306 | |
# | |
############################################# | |
$_fileName="$ARGV[0]" || "crsqual.txt"; |
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
procedure distancesearch | |
privilege owner | |
description "Returns cities,states,zips, and distances from the given zip and number of miles" | |
inputs inZip char(10) "inZip" | |
inMiles integer "inMiles" | |
returns char(30) "retCity" | |
char(2) "retSt" |
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
#!/opt/perl514/bin/perl | |
use DBI; | |
use URI::Escape; | |
use JSON; | |
use Time::HiRes qw(usleep); | |
use feature qw(switch); | |
# set delay so script doesn't reach API hits per second threshold | |
my $delay = 250; |