Skip to content

Instantly share code, notes, and snippets.

View mhriemers's full-sized avatar

Martijn Riemers mhriemers

  • NAVARA
  • Utrecht, The Netherlands
View GitHub Profile
@ziadoz
ziadoz / awesome-php.md
Last active July 13, 2024 05:29
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@currencysecrets
currencysecrets / WinFile.mqh
Created April 27, 2014 19:25
The famous WinFile.mqh file from MTIntelligence.com
//+------------------------------------------------------------------+
//| Copyright © 2009 MTIntelligence.com |
//| http://www.mtintelligence.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009 MTIntelligence.com"
#property link "http://www.mtintelligence.com"
// *************************************************************************************
//
@danrigsby
danrigsby / packer-ami-id
Last active December 14, 2023 15:07
Get AMI ID from a packer build
packer build packer.json 2>&1 | sudo tee output.txt
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt
@LukeL99
LukeL99 / compress-web-video.sh
Created December 29, 2015 21:22
Compress video output for HTML5 background video
#!/bin/bash
# Make sure ffmpeg is installed with the following flags
# brew install ffmpeg --with-libvpx
#
# Take source video, convert to raw grayscale (-pix_fmt gray),
# remove audio track (-an), darken it by 50% (-vf "lutyuv=y=val*.5"),
# and output to an avi container for maximum compatibility.
# Pipe all that to stdout
# (ffmpeg -i - \) take input rawvideo track, and...
@jpallari
jpallari / Main.scala
Last active February 5, 2024 08:29
Ways to pattern match generic types in Scala
object Main extends App {
AvoidLosingGenericType.run()
AvoidMatchingOnGenericTypeParams.run()
TypeableExample.run()
TypeTagExample.run()
}
class Funky[A, B](val foo: A, val bar: B) {
override def toString: String = s"Funky($foo, $bar)"
}