Skip to content

Instantly share code, notes, and snippets.

View snikulov's full-sized avatar
💭
I may be slow to respond.

Sergei Nikulov snikulov

💭
I may be slow to respond.
View GitHub Profile
@afloesch
afloesch / jenkins-in-docker.md
Last active June 9, 2024 15:04
Jenkins in Docker (docker-in-docker)

Jenkins in Docker (docker-in-docker)

Testing Jenkins flows on your local machine, or running Jenkins in production in a docker container can be a little tricky with a docker-in-docker scenario. You could install Jenkins to avoid any docker-in-docker issues, but then you have Jenkins on your machine, and the local environment is likely going to be a fairly different from the actual production build servers, which can lead to annoying and time-consuming issues to debug.

Build environment differences are precisely why there is a strong argument to be made to run build processes strictly in docker containers. If we follow the philosophy that every build step or action should run in a docker container, even the Jenkins server itself, then we get massive benefits from things like, total control over the build environment, easily modify the build environment without the possibility of adversely effecting other jobs, explicit and strongly controlled tool versions,

@krisleech
krisleech / renew-gpgkey.md
Last active June 21, 2024 13:38
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@ArseniyShestakov
ArseniyShestakov / add.sh
Last active August 25, 2023 14:14
My compiler alternatives
# Cleanup old alternatives
update-alternatives --remove-all cc
update-alternatives --remove-all c++
update-alternatives --remove-all gcc
update-alternatives --remove-all g++
update-alternatives --remove-all clang
update-alternatives --remove-all clang++
update-alternatives --remove-all icc
update-alternatives --remove-all icc++
@mbodo
mbodo / Linux - Systemd cheatsheet.md
Last active June 14, 2024 08:48
Systemd cheatsheet

Linux - Systemd cheatsheet

systemctl

Activates a service immediately:

systemctl start foo.service

Deactivates a service immediately:

@gvanem
gvanem / SnmpMgr.c
Last active December 13, 2018 19:46
Windows SNMP client with libcurl
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
@bathizte
bathizte / lighttpd_transmission_proxy.conf
Last active January 30, 2024 09:26
Lighttpd CORS reverse proxy for transmission
# Lighttpd as a CORS reverse proxy to Transmission XML-RPC API
server.modules = (
"mod_rewrite",
"mod_setenv",
"mod_proxy"
)
server.document-root = "/var/www"
# CORS preflighted request (HTTP OPTIONS) not handled yet by Transmission : Emulate a 200 OK
$HTTP["request-method"] =~ "^OPTIONS$" {
@miguelmota
miguelmota / README.md
Last active May 25, 2024 13:23
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References

@yoggy
yoggy / SerialPort.cpp
Created August 11, 2012 10:58
SerialPort class sample using boost::asio::serial_port
#include "StdAfx.h"
#include <Setupapi.h>
#pragma comment(lib, "Setupapi.lib")
#include "SerialPort.h"
SerialPort::SerialPort(void) : end_of_line_char_('\n')
{
}
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"