Skip to content

Instantly share code, notes, and snippets.

Avatar
😴
Sleeping...

Microdog microdog

😴
Sleeping...
View GitHub Profile
@microdog
microdog / migrate_bee_clef_keystore.sh
Created Mar 4, 2021
Migrate clef keystore generated by bee-clef to lightkdf
View migrate_bee_clef_keystore.sh
#!/bin/bash
set -e
parse_json() { echo "$1" | sed -e 's/[{}]/''/g' | sed -e 's/", "/'\",\"'/g' | sed -e 's/" ,"/'\",\"'/g' | sed -e 's/" , "/'\",\"'/g' | sed -e 's/","/'\"---SEPERATOR---\"'/g' | awk -F=':' -v RS='---SEPERATOR---' "\$1~/\"$2\"/ {print}" | sed -e "s/\"$2\"://" | tr -d "\n\t" | sed -e 's/\\"/"/g' | sed -e 's/\\\\/\\/g' | sed -e 's/^[ \t]*//g' | sed -e 's/^"//' -e 's/"$//'; }
chk_command() {
if ! command -v "$1" &>/dev/null; then
echo "missing clef: $1"
exit 1
fi
View gist:8ecbf76d585d4c313555cc6444505745
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools
OPENSSL="openssl-1.0.2j"
NGINX_VERSION="1.11.6-1"
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-$NGINX_VERSION.el7.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-geoip-$NGINX_VERSION.el7.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-image-filter-$NGINX_VERSION.el7.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-njs-1.11.6.0.1.4-2.el7.ngx.src.rpm
@microdog
microdog / log
Created Apr 21, 2014
Log of installing Pintos on CentOS 6.5
View log
1 sudo yum install make conf automake gcc g++
3 sudo yum install vim
4 git clone http://cs140.stanford.edu/pintos.git
6 sudo yum install git
7 git clone http://cs140.stanford.edu/pintos.git
9 cd pintos/
10 sudo bash -c 'echo -e "\nexport PINTOSDIR="`pwd`"/\n" >> /etc/profile' && source /etc/profile
12 echo $PINTOSDIR
13 cd ../
14 ls