This file contains 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
## Slow requests grouped by function call | |
cat /var/log/php-fpm/www-slow.log | grep -A 1 script_filename | \ | |
grep -v script_filename | grep -v -e "--" | cut -c 22- | sort | uniq -c | sort -nr | |
## Slow requests grouped by minute | |
cat /var/log/php-fpm/www-slow.log | grep 'pool www' | \ | |
cut -d' ' -f2 | sort | cut -d: -f1,2 | uniq -c | |
## Top 25 1 minute groups of slow requests | |
cat /var/log/php-fpm/www-slow.log | grep 'pool www' | cut -d' ' -f2 | \ |
This file contains 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
#!/bin/bash | |
# Fetch 24-hour AWS STS session token and set appropriate environment variables. | |
# See http://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html . | |
# You must have jq installed and in your PATH https://stedolan.github.io/jq/ . | |
# Add this function to your .bashrc or save it to a file and source that file from .bashrc . | |
# https://gist.github.com/ddgenome/f13f15dd01fb88538dd6fac8c7e73f8c | |
# | |
# usage: aws-creds MFA_TOKEN [OTHER_AWS_STS_GET-SESSION-TOKEN_OPTIONS...] | |
function aws-creds () { | |
local pkg=aws-creds |
This file contains 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
/** | |
* Marlin 3D Printer Firmware | |
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] | |
* | |
* Based on Sprinter and grbl. | |
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
This file contains 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
/* | |
After purchasing a humble book bundle, go to your download page for that bundle. | |
Open a console window for the page and paste in the below javascript | |
this fork downloads all formats and does so without using jquery (since that didnt work for me) | |
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this | |
type “about:plugins” in the address bar and disable chrome's pdf viewer | |
*/ | |
var pattern = /(MOBI|EPUB|PDF)$/i; |
This file contains 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
[INFO ] [GL ] NPOT texture support is available | |
[INFO ] [OSC ] using <multiprocessing> for socket | |
[INFO ] [ProbeSysfs ] device match: /dev/input/event0 | |
[INFO ] [HIDInput ] Read event from </dev/input/event0> | |
[INFO ] [Base ] Start application main loop | |
[INFO ] [HIDMotionEvent] using <FT5406 memory based driver> | |
[INFO ] [HIDMotionEvent] <FT5406 memory based driver> range ABS X position is 0 - 800 | |
[INFO ] [HIDMotionEvent] <FT5406 memory based driver> range ABS Y position is 0 - 480 | |
[INFO ] [HIDMotionEvent] <FT5406 memory based driver> range position X is 0 - 800 | |
[INFO ] [HIDMotionEvent] <FT5406 memory based driver> range position Y is 0 - 480 |
This file contains 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
# Clear the two common binds for prefix to "clean the slate" | |
unbind C-a | |
unbind C-b | |
#I need this in cygwin to make mouse mode work properly, might not be needed for others | |
set -sg escape-time 250 | |
#make the command prefix control+a | |
set -g prefix C-a |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am PeterGrace on github. | |
* I am petergrace (https://keybase.io/petergrace) on keybase. | |
* I have a public key whose fingerprint is 4BD3 38C5 306A A1B1 54F9 757F 94B3 C1E1 BAFD 725B | |
To claim this, I am signing this object: |