Skip to content

Instantly share code, notes, and snippets.

View ictus4u's full-sized avatar
🚀

Walter Gomez ictus4u

🚀
View GitHub Profile
@olih
olih / jq-cheetsheet.md
Last active July 2, 2025 18:10
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

OpenLDAP
基本的には書籍p.476-の手順に従っている。
パッケージインストール
sudo yum install openldap-servers openldap-clients libtool-ltdl
サービス自動起動
sudo systemctl enable slapd.service
@rkuzsma
rkuzsma / gist:b9a0e342c56479f5e58d654b1341f01e
Last active May 18, 2024 15:40
Example Kubernetes yaml to pull a private DockerHub image
Step by step how to pull a private DockerHub hosted image in a Kubernetes YML.
export DOCKER_REGISTRY_SERVER=https://index.docker.io/v1/
export DOCKER_USER=Type your dockerhub username, same as when you `docker login`
export DOCKER_EMAIL=Type your dockerhub email, same as when you `docker login`
export DOCKER_PASSWORD=Type your dockerhub pw, same as when you `docker login`
kubectl create secret docker-registry myregistrykey \
--docker-server=$DOCKER_REGISTRY_SERVER \
--docker-username=$DOCKER_USER \
@efrecon
efrecon / run.tpl
Last active July 9, 2025 00:12
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@mpneuried
mpneuried / Makefile
Last active July 4, 2025 23:21
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
#!/bin/sh
## Fonction pour générer un password.
## "randpw" pour générer un mot de passe aléatoire de 32 caractères
## "randpw <n>" pour générer un mot de passe aléatoire de <n> caractères
randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;}
## Définir les mots de passe et les exporter pour qu'ils soient visibles des scripts.
cat > passwords << EOF
DATA_CONFIG_PASSWORD=`randpw`
DATA_ADMIN_PASSWORD=`randpw`
DATA_SERVICE_PASSWORD=`randpw`
@0xjac
0xjac / private_fork.md
Last active July 7, 2025 10:00
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@jonico
jonico / Jenkinsfile
Last active March 5, 2025 22:51
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@sebble
sebble / stars.sh
Last active June 7, 2025 13:20
List all starred repositories of a GitHub user.
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
pipeline {
agent any
parameters {
string(defaultValue: '', description: 'The name of the organization working on this repository.', name: 'orgName')
}
stages{
stage("Create Repo Piplines") {
steps {