Skip to content

Instantly share code, notes, and snippets.

🐵
Busy

Rohit Yadav rhtyd

🐵
Busy
Block or report user

Report or block rhtyd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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 / 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 .
View fnctl:lockf-vs-flock.py
import fcntl
# Expected output:
# lock acquired
# failed to lock
# lock acquired
lf = '/tmp/some.lock'
h = None
View keybase.md

Keybase proof

I hereby claim:

  • I am rhtyd on github.
  • I am rhtyd (https://keybase.io/rhtyd) on keybase.
  • I have a public key ASBKF-flSK_mbBPGMd3WG_j9wdAixP7jobxQPeZjaWyzIgo

To claim this, I am signing this object:

You can’t perform that action at this time.