Skip to content

Instantly share code, notes, and snippets.

@tshtilman
tshtilman / update_user.js
Created April 22, 2020 06:00
how to update user programtically
var serviceAccount = require('blackswan-firebase-key.json');
var app = admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://blackswan-161813.firebaseio.com/users/......'
});
admin.auth().getUser('dsp5HJ7lXtQlLOBxamo1YW2vVGX2')
.then(function(userRecord) {
// See the UserRecord reference doc for the contents of userRecord.
console.log('Successfully fetched user data by UID Before:', userRecord.toJSON());
{
"action": {
"isException": true,
"result": {
"message": "Parse error: unexpected 'in' at position 26 of expression '$.tier-alarm-status-scale-in'",
"details": "Traceback (most recent call last):
File \"/usr/lib/python2.7/site-packages/murano/common/engine.py\", line 166, in _execute
obj = executor.load(self.model)
File \"/usr/lib/python2.7/site-packages/murano/dsl/executor.py\", line 190, in load
result = self._object_store.load(data.get(constants.DM_OBJECTS), None)
{
"outputs": {
"tier-alarm-status-scale-in": {
"description": null,
"value": {
"get_attr": [
"server",
"first_address"
]
}
@tshtilman
tshtilman / 0_reuse_code.js
Created November 30, 2015 14:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tshtilman
tshtilman / 0_rg.yaml
Created September 20, 2015 09:08
heat static ip change
heat_template_version: 2013-05-23
parameters:
count:
type: number
default: 2
personalization_map:
type: json
network_id:
type: string
resources:
@tshtilman
tshtilman / env.yaml
Last active August 27, 2015 12:30
server personality resource group
parameters:
personalization_map: { "auth_0" :{"flavor": "SMALL_1" ,"image": "redhat7-v2" ,"zone": "RegionOne:compute-0-0.local"}, "auth_1" :{"flavor": "SMALL_1" ,"image": "alu-app" ,"zone": "RegionOne:compute-0-1.local"} }
count: 2
@tshtilman
tshtilman / connect_to_vm.mist
Created August 17, 2015 23:42
mistral workflow connecto to machine via ssh
version: "2.0"
ssh_to_vm:
input:
- stack_id
- username
- password
tasks:
list_stack_resource:
@tshtilman
tshtilman / main-stack.yaml
Created August 17, 2015 11:59
hardware KPI
heat_template_version: 2013-05-23
parameters:
image:
type: string
description: Image used for servers
default: CentoOScloudInit
flavor:
type: string
description: flavor used by the web servers
@tshtilman
tshtilman / basic_cloud_init.yaml
Created August 12, 2015 13:48
basic cloud init
heat_template_version: 2013-05-23
description: Simple template to deploy a single compute instance
parameters:
image:
type: string
label: Image name or ID
description: Image to be used for compute instance
default: cirros-0.3.3-x86_64
@tshtilman
tshtilman / hello_world_with_volume_attahcement.yaml
Created August 12, 2015 03:47
hello world with volume attachement
heat_template_version: 2014-10-16
description: Hello World!
parameters:
volume_size_gb:
type: number
default: 1
constraints:
- range: { min: 1 }