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
# 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/ |
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 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 |
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
# 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 |
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/lua | |
-- Metrics web server (0.1) | |
-- Copyright (c) 2015 Kevin Lyda | |
-- Apache 2.0 License | |
socket = require("socket") | |
netsubstat = {"IcmpMsg", "Icmp", "IpExt", "Ip", "TcpExt", "Tcp", "UdpLite", "Udp"} | |
cpu_mode = {"user", "nice", "system", "idle", "iowait", "irq", | |
"softirq", "steal", "guest", "guest_nice"} | |
netdevsubstat = {"receive_bytes", "receive_packets", "receive_errs", |
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
#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; | |
} |
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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
source "https://rubygems.org" | |
gem 'mmap', git: 'https://github.com/lyda/mmap.git', :branch => 'non-global-version' |
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
*> Copyright (C) 2006 Micro Focus (IP) Limited. | |
*> All rights reserved. | |
*> | |
*> Michael Wojcik, Micro Focus International Ltd | |
*> April 2006 | |
$set ans85 mf sourceformat"free" align"8" notrickle opt"4" | |
$set noalter comp nocheck nocheckdiv noqualproc noseg notrunc | |
$set scheduler |
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
/* rewritten example of JsonWebToken example | |
* from https://gist.github.com/thealexcons/4ecc09d50e6b9b3ff4e2408e910beb22 | |
* Keys are generated and packed to PEM-format at server start | |
* Plus some fixes and refactors | |
* | |
* My respect to thealexcons | |
*/ | |
package main | |
import ( |
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
#!/bin/bash | |
# Documentation that helped with this: | |
# https://github.com/luebken/serverless-the-manual-way | |
# Status: | |
# https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1 | |
# See: https://developer.twitter.com/en/apps/16043135 | |
TWITTER_CONSUMER_KEY=secret | |
TWITTER_CONSUMER_SECRET=secret |
OlderNewer