Skip to content

Instantly share code, notes, and snippets.

View lyda's full-sized avatar

Kevin Lyda lyda

View GitHub Profile
@lyda
lyda / www
Last active January 23, 2016 09:13 — forked from dg01d/www
#Server declaration for non-encrypted port 80
server {
listen 80;
server_name mysite.com www.mysite.com;
location /.well-known/acme-challenge/ {
root /var/www/challenges/;
try_files $uri =404;
}
@lyda
lyda / historymerge
Last active December 15, 2015 22:50
A simple script to automate shell history file merges.
#!/usr/bin/env python
import sys
"""
historymerge: Merges a shell history file.
If you keep your shell history files in your hg repo, this script can be
useful for merging changes from various machines. Obviously you should
*never* check such things into public repos. This is for private repos
@lyda
lyda / robots.txt
Last active December 10, 2015 16:39
The suggested changes to the Irish Times robots.txt file to prevent automated scraping.
# This is the modified Irish Times robots.txt file. @hlinehan would like to prevent automated scraping.
# I've made some changes to allow that.
User-agent: *
Disallow: /dublin/
Disallow: /eurotimes/
Disallow: /survey/
Disallow: /promotion/
Disallow: /Storage/
Disallow: /ITImage/
Disallow: /newspaper/pdf/
@lyda
lyda / s3.sh
Last active August 29, 2015 14:20 — forked from chrismdp/s3.sh
# 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