Skip to content

Instantly share code, notes, and snippets.

View redbearder's full-sized avatar
🎯
Focusing

redbearder

🎯
Focusing
  • BJ, China
View GitHub Profile
@mr-exz
mr-exz / sonar-set-project-as-private.sh
Created February 26, 2020 07:40
How to set all existing projects to private in SonarQube
# requirements: curl, jq
USER=user
PASSWORD=password
SONAR_URL=https://sonar.server.com
for pkey in `curl -X POST -v -u ${USER}:${PASSWORD} ${SONAR_URL}/api/projects/search?qualifiers=TRK&ps=500 | jq -r .components[].key`; do
curl -X POST -v -u ${USER}:${PASSWORD} ${SONAR_URL}/api/projects/update_visibility?project=${pkey}\&visibility=private;
done
@ozbillwang
ozbillwang / Git_Behind_Proxy.md
Last active October 17, 2025 22:34
Configure Git to use a proxy (https or SSH+GIT)
@aursu
aursu / gitlab-error-encryption.md
Last active April 9, 2025 05:53
GitLab error OpenSSL::Cipher::CipherError () in app/controllers/admin/application_settings_controller.rb:40:in `update'

The issue

It happened after secrets file was lost during GitLab upgrade.

The case described in documentation When the secrets file is lost

But not completely clear.

From log file /var/log/gitlab/gitlab-rails/production.log:

@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active March 29, 2026 06:43 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@tossmilestone
tossmilestone / Flake8.txt
Created March 30, 2018 06:55
Flake8 integrated with PyCharm
How to manually setup flake8 as PyCharm external tool
File / Settings / Tools / External Tools / Add
Name: Flake8
Program: $PyInterpreterDirectory$/python
Parameters: -m flake8 --max-complexity 10 --ignore E501 $FilePath$
Working directory: $ProjectFileDir$
Output Filters / Add
Name: Filter 1
@lferro9000
lferro9000 / Jenkinsfile
Created July 30, 2017 09:59
Jenkinsfile with PHP pipeline for Jenkins 2
#!/usr/bin/env groovy
node('php') {
stage('Get code from SCM') {
checkout(
[$class: 'GitSCM', branches: [[name: '*/#your-dev-branch#']],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active February 14, 2026 13:33
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

pipeline {
agent any
stages {
stage('Prepare') {
steps {
sh 'composer install'
sh 'rm -rf build/api'
sh 'rm -rf build/coverage'
sh 'rm -rf build/logs'
@RoomArchitect
RoomArchitect / update-miwifi-with-shadowsocks.md
Created May 3, 2017 07:15 — forked from rambolee/update-dnsmasq-from-gfwlist.py
升级 小米路由器3 可以ssh 可以 Shadowsocks [Tags]: 小米路由, 小米路由3, 小米路由器, 小米路由器3, ssh, shadowsocks
@magnetikonline
magnetikonline / README.md
Last active March 13, 2026 00:36
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script which will:

  • Iterate all commits made within a Git repository.