Moved to tdhopper.com.
#!/bin/bash | |
usage() { | |
cat << EOF | |
Usage: $0 [OPTION]... COMMAND | |
Execute the given command in a way that works safely with cron. This should | |
typically be used inside of a cron job definition like so: | |
* * * * * $(which "$0") [OPTION]... COMMAND | |
Arguments: |
<?php | |
// Group detection by IP address | |
// | |
// [Region Abbreviation, Military/Government] | |
// Force Varnish to NEVER Cache this page | |
header("Cache-Control: no-cache, must-revalidate"); | |
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); | |
// JSON Headers |
import org.apache.hadoop.fs.{FileSystem, Path} | |
import org.apache.hadoop.conf.Configuration | |
case class S3File(path: String, isDir: Boolean, size: Long) { | |
def children = listFiles(path) | |
} | |
def listFiles(path: String): Seq[S3File] = { | |
val fs = FileSystem.get(new java.net.URI(path), new Configuration()) | |
fs.listStatus(new Path(path)).map(s => S3File(s.getPath.toString, s.isDir, s.getLen)) |
Welcome to | |
____ __ | |
/ __/__ ___ _____/ /__ | |
_\ \/ _ \/ _ `/ __/ '_/ | |
/___/ .__/\_,_/_/ /_/\_\ version 1.1.0 | |
/_/ | |
Using Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65) | |
Type in expressions to have them evaluated. | |
Type :help for more information. |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
Last year, I tweeted:
Good morning!
Have you audited your code to fix all uses of YYYY where you meant yyyy yet?
If not: Happy 2015!
— Peter Hosey (@boredzo) December 29, 2014
This year, I noticed that the problem comes earlier, so I sent out an early reminder:
You probably want to do this year's YYYY audit soon, because 2016 starts on Dec 26 this year: https://twitter.com/boredzo/status/549582777956323331
— Pumpkin Hollow (@boredzo) October 24, 2015
But exactly what problem am I refe
#!/bin/bash | |
# | |
# Check a "few" things to help write more maintainable Go code. | |
# | |
# OK, it's fairly comprehensive. So simply remove or comment out | |
# anything you don't want. | |
# | |
# Don't forget to install (go get) each of these tools. | |
# More info at the URLs provided. | |
# |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
I use PostgreSQL via the psql client. If you use a different client (eg. pgAdmin, etc.), I don't know how much will translate over.
One nice difference between psql and mysql (cli) is that if you press CTRL+C, it won't exit the client.
psql -U postgres