Skip to content

Instantly share code, notes, and snippets.

View fedir's full-sized avatar
🌤️
The sun is behind every cloud

Fedir RYKHTIK fedir

🌤️
The sun is behind every cloud
View GitHub Profile
@fedir
fedir / .gitignore
Last active March 23, 2024 16:03 — forked from Avinashachu007/.gitignore
.gitignore for Java, Maven, Spring Boot - Eclipse, Netbeans, IntelliJ IDEA, Visual Studio Code
/target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
@fedir
fedir / clair.jenkinsfile
Last active January 15, 2021 15:44
Jenkinsfile Clair Step
stage("docker_scan avec clair"){
sh '''
docker rm db
docker rm clair
docker run -p 5432:5432 -d --name db arminc/clair-db:2021-01-08
docker run -p 6060:6060 -d --name clair arminc/clair-local-scan:arminc/clair-local-scan:v2.1.6_3bfb31ea61aa42eeb836354976065ccea308707e
clair-scanner --clair="http://clair:6060" vulnerables/web-dvwa
'''
@fedir
fedir / main.tf
Created January 3, 2021 22:44
Playing locally with TF and Nexus
## Providers declaration
terraform {
required_providers {
nexus = {
source = "datadrivers/nexus"
version = "1.10.5"
}
}
}
@fedir
fedir / main.tf
Created December 23, 2020 21:14
Local Docker provisioning with Terraform sample
# Local Docker provisionning
terraform {
required_providers {
docker = {
source = "terraform-providers/docker"
}
}
}
provider "docker" {}
@fedir
fedir / GopherCon_EU_Online_2020.md
Last active November 18, 2020 11:38
GopherCon Europe: Online 2020 videos - Ordered by "positive interest" metric with yrank
TITLE URL PUBLISHED AT POSITIVE INTERESTINGNESS TOTAL INTERESTINGNESS VIEWS LIKES DISLIKES COMMENTS TOTAL REACTION GLOBAL BUZZ INDEX
GopherCon Europe 2020: Kofo Okosela - Writing Open Source Tooling Using AST https://www.youtube.com/watch?v=0DE_7Nff6yg 2020-07-11 13:14:27 0.0323 0.0361 527 18 1 0 19 10013
GopherCon Europe 2020 LT: Ron Evans - A Small Update On TinyGo https://www.youtube.co
@fedir
fedir / Dockerfile
Last active July 8, 2020 22:47
Simple API server for SupInfo devops specialization
FROM golang:latest
RUN mkdir /app
ADD . /app/
WORKDIR /app
RUN go build -o main .
CMD ["/app/main"]
@fedir
fedir / .bashrc
Last active March 10, 2020 13:41
Kubernetes Linux Mint
source <(kubectl completion bash) # active l'auto-complétion pour bash dans le shell courant, le paquet bash-completion devant être installé au préalable
echo "source <(kubectl completion bash)" >> ~/.bashrc # ajoute l'auto-complétion de manière permanente à votre shell bash
alias k=kubectl
complete -F __start_kubectl k
@fedir
fedir / tellmeyoursecrets.js
Last active January 20, 2020 15:52 — forked from rzrbld/tellmeyoursecrets.js
Google Apps Script that lists a lot of info about the files in a particular folder/sub folder structure including viewers, editors, and sharing access type
function listFolders(folder) {
var sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Folder Name" ,"Name","Sharing Access", "Get Editors", "Get Viewers", "Date", "URL"]);
folderID = "ID"
listFolder(sheet, folderID)
}
function listFolder(sheet, folderID) {
var folder = DriveApp.getFolderById(folderID);
addRootFilesToSheet(sheet, folder)
@fedir
fedir / ResolvingGitConflictsInProduction.md
Created January 7, 2020 12:11
Resolving Git conflicts in production

Checking for possible conflicts

git fetch origin branch
git diff --name-only HEAD..origin/branch
git diff HEAD..origin/branch directory_foo/file_bar.ext

Using git vimdiff

git config merge.tool vimdiff

git config merge.conflictstyle diff3

@fedir
fedir / goUpgrade.sh
Last active December 23, 2019 17:14
Go update script for Linux Mint / Ubuntu / Debian (and some other distributions)
#!/bin/bash
# Golang upgrade script
# (C) 2019, Fedir RYKHTIK
# Usage: define the version constants and use it under the account
# Define target constants
VERSION="1.13.5"
OS="linux"