Skip to content

Instantly share code, notes, and snippets.

View themarcelor's full-sized avatar
🎓
crescat scientia, vita excolatur

Marcelo R Costa themarcelor

🎓
crescat scientia, vita excolatur
View GitHub Profile
@themarcelor
themarcelor / fib.go
Created February 6, 2022 22:45
silly fibonacci function in golang
package main
import (
"fmt"
)
func fib(num int) []int {
prev, prevprev := 0, 1
result := []int{}
import mock
class MyDatabaseAccessModule():
def fetch_data_from_db(self):
print('this one will also not be printed')
return "the data"
class MyHTTPAPIModule():
def fetch_data(self):
print('this will never be printed')
# Install dependency:
# pip install PyJWT==1.4.0
# How to:
# python debug_api_key.py ~/Downloads/credentials.json
import json
import sys
import base64
import jwt
import time
jenkins-blood
jenkins-brain
jenkins-niaid
jenkins-dcp
jenkins-genomel
import random, uuid
# metrics here
some_operation = Counter(
"my_metric_for_operation",
"This is the description of the metric",
["username", "guid", "requested_protocol"],
)
protocols = ["s3", "gs", "http"]
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import hudson.Util;
currentTime = new Date().getTime()/1000 as Integer
Date date = new Date(currentTime * 1000L);
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z");
String formatted = format.format(date);
GUID md5 size acl url
dg123/c2da639f-aa25-4c4d-8e89-02a143788268 73d643ec3f4beb9020eef0beed440ad4 13 [jenkins2] s3://cdis-presigned-url-test/testdata
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
master:
# Used for label app.kubernetes.io/component
componentName: "k8s-jenkins-master-deployment"
serviceType: NodePort
NodePort: 32323
adminUser: "admin"
adminPassword: *****
image: "jenkins/jenkins"
tag: "2.233"
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: "2020-04-17T16:16:32Z"
generation: 8
labels:
app: jenkins
app.kubernetes.io/component: k8s-jenkins-master-deployment
app.kubernetes.io/instance: k8sjenkins
app.kubernetes.io/managed-by: Tiller