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
This shit has been bugging me for too long, so I went on a hunt and found a workaround. | |
The Symptoms are as follows: | |
* Clicking the address bar results in a 1-4 second delay | |
* Opening links in new tabs results in a 1-4 second delay | |
* +T results in a 1-4 second delay | |
* `PressAndHold[<pid>]: IMKServer Stall detected` is present in `/var/log/system.log` at the time of the hang. | |
It appears to be to do with the PressAndHold helper - the thing that shows an IOS style selection of accents when you hold a key down. | |
The fix may have some unwanted effects, I haven't really noticed any. |
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 aptitude purge $(dpkg -l | grep php | awk '{print $2}' | tr "\n" " ") |
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
#!/bin/bash | |
set -eo pipefail | |
semver_regex="^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(\-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$" | |
usage="\ | |
Usage: | |
$0 | |
$0 show |
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
#!/usr/bin/env sh | |
vagrant=$(which vagrant) | |
awk=$(which awk) | |
printf "Gathering a list of machines. " | |
machines=$(vagrant global-status --prune 2>/dev/null | $awk '/running/ {print $5}') | |
if [ ! -z "${machines[@]}" ] | |
then |
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
[vagrant@web ~]$ # sudo yum install policycoreutils-python | |
[vagrant@web ~]$ # sudo audit2allow -a -M httpd_copious | |
[vagrant@web ~]$ # sudo semodule -i httpd_copious.pp |
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
[vagrant@web ~]$ cat httpd_copious.te | |
module httpd_copious 1.0; | |
require { | |
type httpd_t; | |
type default_t; | |
type hugetlbfs_t; | |
class file { write getattr }; | |
class capability2 block_suspend; |
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
wget https://gist.githubusercontent.com/colby/20fb4fc48f5ebf9a062da5fdf1f59f88/raw/c154e38fb44f9aaf1e6d8329cc5546bef41b57ea/dank-tags.csv | |
function dank() { | |
local tags=~/Desktop/dank-tags.csv | |
if [[ $# -gt 0 ]] | |
then | |
grep "$@" $tags | gsort --random-sort | head -n 1 | say | |
else | |
gsort --random-sort $tags | head -n 1 | say | |
fi |
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
#!/bin/bash | |
set -e | |
platform=$(uname) | |
if [ "$platform" == 'Darwin' ] | |
then | |
sed=$(which gsed || errcho "install gnu-sed") | |
else | |
sed=$(which sed) |
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
#!/usr/bin/env sh | |
vagrant=$(which vagrant) | |
awk=$(which awk) | |
printf "Gathering a list of machines. " | |
machines=$(vagrant global-status --prune 2>/dev/null | vagrant global-status | $awk '/running/ {print $5}') | |
if [ ! -z "${machines[@]}" ] | |
then |
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
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' cert-name.pem |