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 / 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 / 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

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:

@rhtyd
rhtyd / test-kvm.sh
Last active Mar 26, 2016
Marvin - Test My Cloud
@rhtyd
rhtyd / create-rolemaps.py
Last active Mar 22, 2016
Dynamic role-based API checker for CloudStack - Migration from old commands.properties file
View create-rolemaps.py
#!/bin/env python
# Usage: python <script> <commands.properties file>
import sys
import uuid
def createMappings(apis):
# All apis allowed for root Admin
print("INSERT INTO `cloud`.`role_permissions` (`uuid`, `role_id`, `rule`, `permission`) values (UUID(), 1, '*', 'Allow')")
# ResourceAdmin, DomainAdmin, User
roles = [2, 3, 4]
@rhtyd
rhtyd / test-diff
Created Mar 5, 2016
Nux - vms on dashboard
View test-diff
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 22f7409..e91b349 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -4479,6 +4479,7 @@ textarea {
height: 316px;
overflow: auto;
overflow-x: hidden;
+ overflow-y: auto;
/*+placement:shift 0px 0px;*/
@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" \
You can’t perform that action at this time.