Skip to content

Instantly share code, notes, and snippets.

@zhiguangwang
zhiguangwang / README.md
Created August 26, 2018 08:24
Remove / Uninstall packages marked ‘rc’ on Debian / Ubuntu.

Remove / Uninstall packages marked ‘rc’ on Debian / Ubuntu.

While checking the status of packages using dpkg, it is possible to see a ‘rc’ state for some unused packages, this corresponds to:

  • r: the package was marked for removal
  • c: the configuration files are currently present in the system

In other words: the package is not completely removed (config files are still present), but not installed anymore (and obviously not used).

To see a list of packages marked as ‘rc’:

@timja
timja / jenkins-dump-credentials.groovy
Last active November 22, 2024 16:29
Dump jenkins credentials - use in script console
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import org.jenkinsci.plugins.plaincredentials.impl.*
// def item = Jenkins.instance.getItem("your-folder")
@ivan-pinatti
ivan-pinatti / jenkins-add-username-with-password-credential.groovy
Created May 21, 2018 14:49
Jenkins - Add Username with password credential via groovy script - #jenkins #groovy #username #password #credential #usernameWithPassword
#!groovy
// imports
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.domains.Domain
import com.cloudbees.plugins.credentials.impl.*
import hudson.util.Secret
import jenkins.model.Jenkins
// parameters
@merikan
merikan / Jenkinsfile
Last active April 16, 2025 07:30
Some Jenkinsfile examples
Some Jenkinsfile examples
@ruzickap
ruzickap / create_vagrant_network_lab_with_maas_uefi.sh
Last active January 25, 2023 22:39
Create Vagrant lab environment with 3 separated networks with 3 VMs running MAAS and building 2 UEFI based VMs
# Install Vagrant and virsh command
dnf install -y libvirt-client vagrant-hostmanager vagrant-libvirt
# Allow to manage VMs via libvirt remotely (using TCP connection)
cat >> /etc/libvirt/libvirtd.conf << EOF
listen_tls = 0
listen_tcp = 1
listen_addr = "0.0.0.0"
auth_tcp = "none"
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active April 24, 2025 12:10
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@lenosi
lenosi / README.md
Last active May 12, 2021 11:41
How to speed up Ansible a lot

Introduction

I'm working with Ansible and many of servers every day, so let me show you, how can waste less of your time! :)

What Ansible do? 

  • Connects, runs, check, sends back, processes it, runs, checks, sends back and voila!
  • Connects... again... and again... and again...

What you can do to fix on node/remote server

Edit sshd config and disable UseDNS, it's mainly used only for logging and authentication. But.. only when you have set IgnoreRhosts in your config. So who doesn't know, should use it with clean mind. Because this has truly so far with security. :)

def getProjectName() {
return 'JenkinsPipeline'
}
def getJDKVersion() {
return 'jdk1.8.0_101'
}
def getMavenConfig() {
return 'maven-config'
@dpmex4527
dpmex4527 / docker_svn-server.md
Last active September 5, 2024 10:03
Set up SVN server on docker
@ebridges
ebridges / s3-playbook.yml
Last active June 7, 2021 16:30
Ansible playbook to generate one or more S3 buckets with permissions useful for rclone.
---
## Usage:
## ansible-playbook s3-playbook.yml
- hosts: localhost
connection: local
gather_facts: False
vars:
buckets:
'<BucketName>' : '<BucketARN>'
'com.example.bucket' : 'arn:aws:s3:::com.example.bucket'