Random query recipes of JMESPath for the AWS CLI tools that I might have written or stumbled upon.
This file contains hidden or 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
#ifndef __MATRIX_INCLUDED__ | |
#define __MATRIX_INCLUDED__ | |
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) | |
float4x4 inverse(float4x4 m) { | |
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; | |
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; | |
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; | |
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3]; |
This file contains hidden or 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
#cracks for open source software are always cool.... | |
#requires root privileges to replace omni.ja | |
#needs to be reapplied on reinstall | |
#you'll also need to set xpinstall.signatures.required to false | |
#and restart your browser | |
#tested on arch with FF48 | |
OMNI_PATH=${1:-/usr/lib/firefox} |
This file contains hidden or 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
sudo: required #is required to use docker service in travis | |
language: php #can be any language, just php for example | |
services: | |
- docker # required, but travis uses older version of docker :( | |
install: | |
- echo "install nothing!" # put your normal pre-testing installs here |
This file contains hidden or 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
/* | |
FastList<T> is a System.Collections.Generic.List<T> modification such, that allows to not produce garbage when using foreach. | |
Useful for old versions of c# runtime (like Mono 2.x), i.e. for Unity. | |
It implements own instance-type enumerator and caches only one instance of this enumerator inside. | |
Instance-type enumerator allows to avoid boxing that occurs when foreach converts IEnumerator to IDisposable and calls Dispose(). | |
(Default List<T> enumerator is value-type (struct), so when foreach converts to IDisposable, boxing occurs and 20 bytes of garbage will be collected.) | |
Warnings: |
There is a lot going around docker logging, with merged/closed PRs, here is a collection:
- #12391 syslog format: "docker/ID", and use
syslog.LOG_DAEMON
(old:syslog.LOG_USER
) - #12668 Add tag option to syslog
- #12422 Adding
--log-opt=[]
to configure--log-driver=
- #13392 Add syslog-address log-opt
--log-opt syslog-address=tcp://127.0.0.1:514
- #13672 Add syslog-tag log-opt
--log-opt syslog-address=[tcp|udp]://host:port
--log-opt syslog-address=unix://path
This file contains hidden or 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
$ gcc main.c -lkeyutils && ./a.out | |
15904 1 | |
15904 0 | |
15904 0 | |
15904 0 | |
15905 1 | |
15906 1 | |
15905 0 | |
15906 0 | |
15907 1 |
This file contains hidden or 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 |
NewerOlder