Skip to content

Instantly share code, notes, and snippets.

Lee Packham leepa

Block or report user

Report or block leepa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main.rs
extern crate lambda_runtime as lambda;
#[macro_use]
extern crate log;
extern crate simple_logger;
extern crate serde_derive;
extern crate chrono;
use lambda::{error::HandlerError, lambda};
@leepa
leepa / s3.rs
Created Dec 5, 2018
Partial - this is the structure for S3 events
View s3.rs
#[derive(Deserialize, Debug)]
struct S3Event {
#[serde(rename = "Records")]
#[allow(dead_code)]
records: Vec<S3EventRecord>,
}
#[derive(Deserialize, Debug)]
struct S3EventRecord {
#[serde(rename = "eventVersion")]
View Dockerfile
FROM amazonlinux:1
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.30.1
RUN set -eux; \
yum update -y ;\
yum install -y wget ;\
@leepa
leepa / symbolizecrashlog.sh
Created May 1, 2011
Probably the most important shell script for an iOS developer...
View symbolizecrashlog.sh
#!/bin/bash
AWK_SCRIPT=/tmp/symbolizecrashlog_$$.awk
SH_SCRIPT=/tmp/symbolizecrashlog_$$.sh
if [[ $# < 2 ]]
then
echo "Usage: $0 [ -arch <arch> ] symbol-file [ crash.log, ... ]"
exit 1
fi
View gist:824041adc4d7c824fd5139567c130965
Interval 10
LoadPlugin logfile
<Plugin logfile>
LogLevel debug
File STDOUT
Timestamp true
PrintSeverity true
</Plugin>
View gist:6610440
package main
import (
"fmt"
"runtime"
)
type AssertionError struct {
pc uintptr
View README.md

Notes

So, make sure you replace youraccount with your account name. Also make sure you set the reqadd Authorization line to be the base64 of your token/user/password combo:

echo -n username:password | openssl enc -a

Replace any equals signs with \3D to make sure they are escaped.

View gist:5211940
apache-solr3 @3.6.2 java/apache-solr3
apache2 @2.2.24 www/apache2
apr @1.4.6 devel/apr
apr-util @1.5.1 devel/apr-util
autoconf @2.69 devel/autoconf
automake @1.13.1 devel/automake
bison @2.7 devel/bison
boost @1.53.0 devel/boost
bzip2 @1.0.6 archivers/bzip2
cairo @1.12.14 graphics/cairo
@leepa
leepa / gist:4422736
Created Dec 31, 2012
How to determine which ata device is which sata device on linux - really handy!
View gist:4422736
dmesg | grep 'ata[0-9]\+.[0-9][0-9]: ATA-' | \
sed 's/^.*\] ata//' | \
sort -n | sed 's/:.*//' | \
awk ' { a="ata" $1; printf("%10s is /dev/sd%c\n", a, 96+NR); }'
View 01.configure
2015-11-13 11:41:17 +0000
./configure
--disable-dependency-tracking
--prefix=/usr/local/Cellar/czmq/3.0.2_2
--with-libsodium
configure: WARNING: unrecognized options: --with-libsodium
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
You can’t perform that action at this time.