Skip to content

Instantly share code, notes, and snippets.

View judavi's full-sized avatar

Juan judavi

  • Palet Town
View GitHub Profile
@judavi
judavi / command.yaml
Created July 20, 2023 08:10
What I can do as a Kubernetes SA or User?
kubectl auth can-i --list --as=system:serviceaccount:wcp-sampleapp-clsc:cf-wcp-sampleapp-clsc -n wcp-sampleapp-clsc
@judavi
judavi / OculusQuestCloudGaming.md
Created October 20, 2020 18:25 — forked from alexseward/OculusQuestCloudGaming.md
Playing SteamVR games on the Oculus Quest

Inspired by https://gist.github.com/blixt/97009dfa3eb916dbd4624a38191fe10d and https://github.com/steventhegeek/Parsec-Cloud-Preparation-Tool. Thanks to @blixt and @steventhegeek :)

Setting up your Virtual Machine

We'll be creating a new Virtual Machine on Microsoft's cloud platform, Azure. The VM will have a beefy GPU just like a home computer so it can be used for playing games.

  1. Go to [the Azure portal][azure] and sign up or log in.
  2. If you are on a Free account, first go to Subscriptions and upgrade it to a Pay-as-you-go plan. Don't worry, you will get to keep any free credits you have. Azure's interface is a bit slow so this will take a minute.

⚠️ Make sure to not include any support plan because they will charge you monthly!

@judavi
judavi / test.go
Created June 5, 2020 12:40
Log golang Db query?
package main
import (
"regexp"
"fmt"
"strings"
)
func main() {
var re = regexp.MustCompile(`:\d`)
@judavi
judavi / wallet.py
Created May 17, 2020 09:08
BTC seed guesser
from bitcoinlib.wallets import HDWallet
from bitcoinlib.wallets import HDWalletKey
from bitcoinlib.wallets import HDKey
from bitcoinlib.mnemonic import Mnemonic
# 11 word seed
seed = "please help hard puzzle will become crazy valid seed must sleep"
# here be gold
gold = "bc1qj7467e7r5pdfpypm03wyvguupdrld0ul2gcutg"
@judavi
judavi / .vimrc
Last active January 25, 2021 08:12
Resources CKAD
" Yaml file handling
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
filetype plugin indent on
autocmd FileType yaml setl indentkeys-=<:>
" Copy paste with ctr+c, ctr+v, etc
:behave mswin
:set clipboard=unnamedplus
:smap <Del> <C-g>"_d
:smap <C-c> <C-g>y
@judavi
judavi / note.json
Created March 19, 2020 16:59
Image Notes and Occurrences in Grafeas Model
{
"name": "/projects/images/notes/rhel7_7.14",
"shortDescription": "Base image note for RHEL 7 7.14",
"longDescription": "",
"kind": "baseImage",
"relatedUrl": [
{
"url": "",
"label": "Artifactory URL",
}
@judavi
judavi / occurrence.json
Last active March 19, 2020 13:42
Build Occurrence Grafeas
{
"name": "projects/my-project/occurrences/randomID",
"noteName": "providers/verified-builder/notes/buildID",
"createTime": "2017-06-15T15:28:40.142107Z",
"updateTime": "2017-06-15T15:28:40.142107Z",
"kind": "BUILD",
"resourceUrl": {
"uri": "https://myregistry/image@sha256:hash",
},
"build": {
@judavi
judavi / query.sql
Created February 20, 2020 15:09
Grafeas get URI
SELECT
o.data.noteName AS "note_name",
o.data AS "data",
o.data."resource".uri AS "image"
FROM OCCURRENCES o
@judavi
judavi / main.go
Created February 11, 2020 16:39
Basic Grafeas List Occurrences Client
package main
import (
"context"
"crypto/tls"
"crypto/x509"
"io/ioutil"
"log"
"fmt"