Skip to content

Instantly share code, notes, and snippets.

Avatar
🐵
Busy

Rohit Yadav rhtyd

🐵
Busy
View GitHub Profile
@rhtyd
rhtyd / my.cnf
Created Jul 27, 2015
Example MySQL my.cnf optimized
View my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
syslog
@rhtyd
rhtyd / ubuntu19.10-kvm-rpi4.txt
Last active Sep 25, 2020
Build Ubuntu 19.10 image with KVM for Raspberry Pi 4 ARM64
View ubuntu19.10-kvm-rpi4.txt
(Note: tested on Ubuntu 19.10 host/x86_64 machine)
~~
Install dependencies:
apt-get install binutils-aarch64-linux-gnu gcc-9-aarch64-linux-gnu bison flex build-essential kpartx
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev
cd /usr/bin
sudo ln -s aarch64-linux-gnu-gcc-9 aarch64-linux-gnu-gcc
# Build armstubs:
@rhtyd
rhtyd / vnc-decrypt.sh
Created May 29, 2015
vnc-decrypt: CloudStack VNC Password decryption tool
View vnc-decrypt.sh
#!/bin/bash
input=$(mysql -u root -proot -e "select vnc_password from cloud.vm_instance where name='$1'\G;" | grep vnc_password | sed 's/.*vnc_password: //')
java -classpath /usr/share/cloudstack-common/lib/jasypt-1.9.0.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI decrypt.sh input=$input password=password verbose=true
@rhtyd
rhtyd / patchviasocket.sh
Last active Apr 12, 2019
qemu guest agent based patching
View patchviasocket.sh
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rhtyd
rhtyd / patchviasocket.py
Created Apr 12, 2019
Patchviasocket via bash
View patchviasocket.py
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rhtyd
rhtyd / updateddns
Created Jan 9, 2016
CloudFlare DDNS
View updateddns
cfuser=you@email.com
cfkey=cf-key-here
zoneid=some-zoneid
dnsrec=dns-record-id
domain=somedomain.com
curl -X PUT "https://api.cloudflare.com/client/v4/zones/$zoneid/dns_records/$dnsrec" \
-H "X-Auth-Email: $cfuser" \
-H "X-Auth-Key: $cfkey" \
-H "Content-Type: application/json" \
@rhtyd
rhtyd / deb-build.sh
Created May 23, 2017
Debian-pkg recipe for CloudStack
View deb-build.sh
# Using docker container: https://hub.docker.com/r/bhaisaab/ubuntu-cloudstack-slave/
set -e
#apt-get install -y software-properties-common python-software-properties
#add-apt-repository -y ppa:openjdk-r/ppa
#apt-get update -y
#apt-get install -y git debhelper openjdk-7-jdk genisoimage python python-mysql.connector python-mysqldb python-setuptools maven lsb-release dh-systemd sshpass jq curl wget
export ROOT=$PWD
@rhtyd
rhtyd / README.md
Last active Jul 5, 2016
CloudStack Community Analysis
View README.md

gitlog.sh - gets Apache CloudStack repository and exports git history data to a csv file

download-mboxes.sh - downloads various CloudStack ML archives

parse-mbox-data.sh - parses downloaded mbox archives and exports ML data to a csv file

@rhtyd
rhtyd / rpm-centos6-build.sh
Last active May 11, 2016
Building CloudStack Packages
View rpm-centos6-build.sh
set -e
export ROOT=$PWD
git fetch origin
git clean -fdx
rm -fr deps/*jar deps/awsapi-lib deps/*.mar NONOSS
git checkout -- .
git checkout ${TAG}
export MINOR=${BUILD_ID}
@rhtyd
rhtyd / buildrepo.sh
Last active May 3, 2016
APT/YUM signed repo hosting
View buildrepo.sh
cd /path/to/repo
# rpm
for release in 4.2 4.3 4.4;
do
echo "Buildling repo for $release"
cd $release
rm -fr repodata
createrepo .
You can’t perform that action at this time.