Skip to content

Instantly share code, notes, and snippets.

Avatar
🐵
Busy

Rohit Yadav rhtyd

🐵
Busy
View GitHub Profile
@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 / 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;*/
You can’t perform that action at this time.