Skip to content

Instantly share code, notes, and snippets.

View knikolla's full-sized avatar
🐢

Kristi Nikolla knikolla

🐢
View GitHub Profile
@knikolla
knikolla / mysql-slow.log
Created October 23, 2023 14:58
Database Queries During Devstack Setup.sh
This file has been truncated, but you can view the full file.
/usr/sbin/mysqld, Version: 8.0.34-0ubuntu0.22.04.1 ((Ubuntu)). started with:
Tcp port: 3306 Unix socket: /var/run/mysqld/mysqld.sock
Time Id Command Argument
# Time: 2023-10-22T17:01:01.741022Z
# User@Host: root[root] @ localhost [127.0.0.1] Id: 8
# Query_time: 0.000137 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 1
SET timestamp=1697994061;
select @@version_comment limit 1;
# Time: 2023-10-22T17:01:01.743559Z
# User@Host: root[root] @ localhost [127.0.0.1] Id: 8
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@knikolla
knikolla / get_users_from_keycloak.py
Last active May 22, 2023 21:36
Query all Keycloak Users from the HTTP API
import json
import logging
import requests
from requests.auth import HTTPBasicAuth
logger = logging.getLogger()
def get_client_token():
client_token = None
@knikolla
knikolla / disable.sh
Last active August 18, 2021 15:00
Using `os purge` to delete OpenStack projects
alias kaizen="openstack --os-cloud kaizen"
kaizen project show $1
kaizen project set --disable $1
echo "Servers for $1"
kaizen server list --project $1
echo "Networks for $1"
kaizen network list --project $1
@knikolla
knikolla / rewrite_openstack_endpoints.py
Created May 5, 2020 21:56
Finds and replaces a term in OpenStack endpoints
# This script finds and replaces a term in the urls of endpoints.
# This is useful because you cannot install Devstack with a
# hostname or domain name, so devstack gets installed with an ip
# and then the script replaces that with a hostname.
import openstack
openstack.enable_logging(debug=False)
cloud = openstack.connect(cloud='devstack')
@knikolla
knikolla / brookline_tab_feeds.txt
Created July 9, 2018 15:19
Brookline Tab RSS Feeds (Useful for fetching news with Calibre)
http://brookline.wickedlocal.com/news?template=rss&mime=xml
http://brookline.wickedlocal.com/business-news?template=rss&mime=xml
http://brookline.wickedlocal.com/entertainment?template=rss&mime=xml
http://brookline.wickedlocal.com/lifestyle?template=rss&mime=xml
http://brookline.wickedlocal.com/opinion?template=rss&mime=xml
#!/usr/bin/env bash
openssl genrsa -out my.key 2048
openssl req -new -x509 -days 1826 \
-key my.key -out my.crt \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com"
@knikolla
knikolla / settings.json
Last active November 28, 2017 19:52
Visual Studio Code Settings
{
"files.exclude": {
"**/*.pyc": true,
".testrepository": true,
".tox": true,
"*.egg-info": true,
"__pycache__": true
},
"workbench.iconTheme": "ayu",
"workbench.colorTheme": "Ayu Mirage",

Keybase proof

I hereby claim:

  • I am knikolla on github.
  • I am knikolla (https://keybase.io/knikolla) on keybase.
  • I have a public key ASBZ4jnfZNPLrMUgR7HcMwBs9LiDNAEzhmlX3bO_sTe7vQo

To claim this, I am signing this object:

@knikolla
knikolla / ssh-tox.sh
Last active March 23, 2018 19:52
Rsync the current directory to a remote location and execute tox
#!/usr/bin/env bash
# ENV variables required:
# SSH_DEST: destination directory as would have been specified
# to rsync or scp. ex. fedora@10.0.0.1:~
# Get the name of the target directory
TARGET=$(basename `pwd`)
# Clean up
rm -rf .tox