Skip to content

Instantly share code, notes, and snippets.

View robertwe's full-sized avatar
💭
https://github.com/kelseyhightower/kubernetes-the-hard-way

Robert W robertwe

💭
https://github.com/kelseyhightower/kubernetes-the-hard-way
View GitHub Profile
new-caprica.local (192.168.1.140) -> probasket.pl (116.203.4.18) 2024-01-22T22:17:06+0100
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. unifi.local 0.0% 22 0.5 0.5 0.4 0.9 0.1
2. 100.64.0.0 0.0% 22 0.9 1.0 0.8 1.5 0.2
3. 100.64.1.4
import yaml
def extract_pipeline_info(yaml_file):
with open(yaml_file, 'r') as file:
yaml_data = yaml.safe_load(file)
pipeline_info = []
for stage in yaml_data.get('stages', []):
stage_name = stage.get('stage', '')
@robertwe
robertwe / cypress-partial.js
Created January 26, 2022 16:40 — forked from hosuaby/cypress-partial.js
Primitive load-balancer to run Cypress specs in parallel on CI without recording
/**
* Primitive load-balancer to split Cypress specs across multiple runners. This script assumes that
* all your specs are in the folder '<project root>/cypress/integration'. It uses the number of
* tests per spec file as sole criteria to split specs between runners.
*
* This script accepts two arguments: the total number of runners and the index (starting from 0) of
* the current runner. Example:
* $ node cypress-partial.js 5 2
* This command asks for specs to give to the third runner of five runners.
* The output of the script is a coma-separated list of specs that can be given to Cypress. Example:
@robertwe
robertwe / jenkins-decrypt.groovy
Created October 27, 2020 18:22 — forked from tuxfight3r/jenkins-decrypt.groovy
Decrypting Jenkins Password
#To Decrypt Jenkins Password from credentials.xml
#<username>jenkins</username>
#<passphrase>your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J</passphrase>
#go to the jenkins url
http://jenkins-host/script
#In the console paste the script
hashed_pw='your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J'

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@robertwe
robertwe / main.go
Created June 26, 2018 18:50
fasthttp and html
package main
import (
"bytes"
"log"
"github.com/shiyanhui/hero/examples/app/template"
"github.com/valyala/fasthttp"
)
DONE Compiled successfully in 9540ms 07:34:26
Asset Size Chunks Chunk Names
/js/app.js 6.05 MB 0 [emitted] [big] /js/app
/js/appAdmin.js 3.61 MB 1 [emitted] [big] /js/appAdmin
/css/app.css 1.22 MB 0 [emitted] [big] /js/app
/css/appAdmin.css 904 bytes 0 [emitted] /js/app
/messages.js 42.9 kB [emitted]
[Browsersync] Proxying: http://showroom.local
[Browsersync] Access URLs:
@robertwe
robertwe / gist:a1d1db70a9da37eeff40c0cd15fb21c0
Created December 16, 2017 02:21 — forked from anildigital/gist:862675ec1b7bccabc311
Remove dangling docker images
docker rmi $(docker images -q -f dangling=true)
curl -vv http://178.33.37.238
* Rebuilt URL to: http://178.33.37.238/
* Trying 178.33.37.238...
* TCP_NODELAY set
* Connected to 178.33.37.238 (178.33.37.238) port 80 (#0)
> GET / HTTP/1.1
> Host: 178.33.37.238
> User-Agent: curl/7.54.0
> Accept: */*
>
server {
server_name myhostname.local;
root /var/www/symfony/web;
location / {
try_files $uri @rewriteapp;
}
location @rewriteapp {