This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage comment out code that you don't need per your CloudStack version | |
input=$(mysql -u root -proot -e "select vnc_password from cloud.vm_instance where name='$1'\G;" | grep vnc_password | sed 's/.*vnc_password: //') | |
# For older ACS versions: | |
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 | |
# For ACS 4.15-17: | |
java -classpath /usr/share/cloudstack-common/lib/jasypt-1.9.3.jar org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI decrypt.sh input=$input password=password verbose=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import copy | |
a = 1 | |
b = [1,2,3] | |
c = "Some random string :)" | |
z = [a,b,c] | |
x = list(z) | |
x[1][1] = 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE `cloud`; | |
INSERT into `cloud`.`vm_template` (unique_name, name, uuid, hvm, hypervisor_type) values ('systemvm-xenserver-4.5-fake-uuid', 'systemvm-xenserver-4.5', 'fakeduuidkvm1', 0, 'KVM'); | |
INSERT into `cloud`.`vm_template` (unique_name, name, uuid, hvm, hypervisor_type) values ('systemvm-vmware-4.5-fake-uuid', 'systemvm-vmware-4.5', 'fakeduuidvmware1', 0, 'VMware'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
IP=$(wget -qO- http://ipecho.net/plain; echo) | |
wget -qO- http://username:[email protected]/nic/update?hostname=fqdn.host.name&myip=$IP &> /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.KeyStore; | |
import javax.net.ssl.KeyManagerFactory; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSocket; | |
import javax.net.ssl.TrustManagerFactory; | |
public class ListCiphers | |
{ | |
public static void main(String[] args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.util.logging.*; | |
import java.io.*; | |
import java.lang.Math.*; | |
import java.nio.charset.*; | |
import java.util.concurrent.LinkedBlockingQueue; | |
import java.util.concurrent.BlockingQueue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[email protected] | |
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" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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;*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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] |