Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Always Be Coding

Mark Stouffer InTEGr8or

💭
Always Be Coding
View GitHub Profile
View gist:21597f3c0f86df6636945e0e71f73e6c
# Full text search
[hendry@t480s 5xx]$ cat bugzilla.sh
aws --profile uneet-dev logs filter-log-events --log-group-name bugzilla --start-time $(date -d "-1 hour" +%s000) \
--filter-pattern '"apex/ping/v1.0"'
# (faster) Query on a JSON structured log
[hendry@t480s 5xx]$ cat alambda.sh
aws --profile uneet-demo logs filter-log-events --log-group-name "/aws/lambda/alambda_simple" --start-time $(date -d "-8
@CMCDragonkai
CMCDragonkai / rust_composition.rs
Last active Jan 30, 2022
Rust: Function Composition (Rust 1.9 nightly) (credit to https://www.youtube.com/watch?v=ZP93Ngeokio)
View rust_composition.rs
#![feature(box_syntax)]
// function composition is not part of the standard library
// see discussion here: https://internals.rust-lang.org/t/function-composition-in-the-standard-library/2615/11
fn main() {
// works on top-level functions, the 'a lifetime is static
// we need debugging display since we're displaying the Option monad, a wrapped type
println!("{:?}", compose(convert_string_to_float, double_float)(Some("2".to_string())));
View gist:d023162facf1d290b1fc
//Accepts a date string and returns a date string formatted for Kendo DatePickers
function dateForKendo(date) {
return kendo.toString(kendo.parseDate(date), 'MM/dd/yyyy');
}