Simple things to do using jq
# turn a delimted string into an array:
echo '"2368;3924"' | jq 'split(";")
[
"2368",
"3924"
]
// In Java 8, ConcurrentHashMap backward compatibility was broken by changing to a covariant return type | |
Code: | |
0: aload_0 | |
1: invokespecial #1 // Method java/lang/Object."<init>":()V | |
4: return | |
public static void main(java.lang.String...); | |
Code: | |
0: new #2 // class java/util/TreeSet |
yum install python-devel libffi-devel openssl-devel | |
rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7 | |
yum install python-pip |
cd /usr/local/Library/Formula | |
# remove no-ssl2 from configure options | |
vi openssl.rb | |
brew install openssl --universal | |
# verify support | |
/usr/local/opt/openssl/bin/openssl ciphers -ssl2 | |
# I install a separate python 2.7.8 so I can switch between versions as-needed | |
git checkout 9c9664e -- python.rb | |
brew install python --universal --with-brewed-openssl |
rem re-run if your system failed the upgrade compatibility check | |
rem if vmware's VGA driver is the problem, delete the driver, reboot, then run | |
schtasks.exe /Run /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" |
#!/usr/bin/env bash | |
sudo xcodebuild -license | |
sudo xcode-select --install | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew tap caskroom/cask | |
brew tap homebrew/dupes | |
brew tap homebrew/fuse | |
brew tap homebrew/headonly |
#!/usr/bin/bash | |
export INSTANCE_ID=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
export INSTANCE_NAME=$( ec2-describe-instances ${INSTANCE_ID} |grep -E "^TAG.+" |cut -f 4,5 |grep -E "^Name" |cut -f 2 ) |
#!/bin/bash | |
# | |
# Amazon Linux cloud-init script | |
# | |
# Amit Bakshi | |
# 10/2014 | |
# | |
if [ `id -u` -ne 0 ]; then | |
sudo exec /bin/bash -x "$0" "$@" | |
fi |
Simple things to do using jq
# turn a delimted string into an array:
echo '"2368;3924"' | jq 'split(";")
[
"2368",
"3924"
]
Allow recent versions of Perl to compile automake. | |
For Yocto. Tested on poky (krogoth branch). | |
From https://gist.github.com/xywei/03b546054f0d2e2f76c5ac530c88268a | |
--- a/bin/automake.in 2015-01-06 03:25:55.000000000 +0800 | |
+++ b/bin/automake.in 2017-07-26 13:58:07.086205701 +0800 | |
@@ -3878,7 +3878,7 @@ | |
sub substitute_ac_subst_variables | |
{ | |
my ($text) = @_; |
#!/usr/bin/env sh | |
system_profiler SPUSBDataType 2>/dev/null \ | |
| sed -n '/iPhone/,/Serial/p' \ | |
| grep "Serial Number:" \ | |
| awk -F ": " '{print substr($2,1,8)"-"substr($2,9,24)}' |