Skip to content

Instantly share code, notes, and snippets.

View joe-askattest's full-sized avatar

Joseph Lenton joe-askattest

View GitHub Profile
version: '2'
services:
web:
image: my-nginx-php-fpm-image
ports:
- "80:80"
volumes:
- ./site:/site
@joe-askattest
joe-askattest / docker-compose.yml
Created February 26, 2019 10:50
php npm fpm docker compose
version: '2'
services:
nginx:
image: nginx:1.15.8-alpine
ports:
- "80:80"
networks:
- code-network
// example usable
for (child, next) in values.iter().with_next() {
// do stuff
}
struct WithNext<I>
where
I: Iterator,
{
@joe-askattest
joe-askattest / Cargo.toml
Created June 10, 2018 22:58
My slack bot attempt dependencies
[package]
name = "testo-slack"
version = "0.1.0"
authors = ["joseph.lenton@askattest.com <joseph.lenton@askattest.com>"]
[dependencies]
slack = "0.20.0"
failure = "0.1.1"
function wrap<T, K extends keyof T>(
obj: T,
): {
[key in K]: () => T[K]
} {
return null as any
}
const person = {
function wrap<K extends string>(
obj: {
[k in K]: number
},
key: K,
): number;
function wrap<K extends string>(
obj: {
function f<A, B>(_a: A, _b: B) {
}
// This works ...
f( 5, 'string' )
// This works ...
f<number, string>( 5, 'string' )
@joe-askattest
joe-askattest / main.rs
Created September 2, 2017 18:17
This is what I want to do
// in main.rs
extern crate acli;
fn main() {
let args = acli::app::args::Args::from_args();
println!("calling {}", args.url);
}
@joe-askattest
joe-askattest / main.rs
Last active September 2, 2017 18:18
This is it working
// in main.rs
extern crate structopt;
extern crate acli;
use structopt::StructOpt;
fn main() {
let args = acli::app::args::Args::from_args();
println!("calling {}", args.url);
}
"==============================================================================
"
" .vimrc
"
" My own .vimrc settings. It aims to be independant of the plugins also
" included, so this could be used without them.
"
"==============================================================================