Skip to content

Instantly share code, notes, and snippets.

antonio-petricca / keep-jenkins-plugins-uptodate.groovy
Created Apr 28, 2020 — forked from alecharp/keep-jenkins-plugins-uptodate.groovy
Simple groovy script to upgrade active plugins when new versions are available
View keep-jenkins-plugins-uptodate.groovy
jenkins.model.Jenkins.getInstance().getUpdateCenter().getSites().each { site ->
hudson.model.DownloadService.Downloadable.all().each { downloadable ->
def plugins = jenkins.model.Jenkins.instance.pluginManager.activePlugins.findAll {
it -> it.hasUpdate()
antonio-petricca / workbench.colorCustomizations.json
Created Apr 27, 2020 — forked from lorvsso/workbench.colorCustomizations.json
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
View workbench.colorCustomizations.json
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
antonio-petricca / jenkins-set-url-and-email.groovy
Created Mar 5, 2020 — forked from ivan-pinatti/jenkins-set-url-and-email.groovy
Jenkins - Set URL and email via groovy script - #jenkins #groovy
View jenkins-set-url-and-email.groovy
// imports
import jenkins.model.Jenkins
import jenkins.model.JenkinsLocationConfiguration
// parameters
def jenkinsParameters = [
email: 'Jenkins Admin <>',
url: ''
antonio-petricca / usb.cpp
Created Sep 30, 2019 — forked from shahpoojan/usb.cpp
A code to send data on the USB port for Windows
View usb.cpp
#include <iostream>
#include <string>
#include <Windows.h>
#include <tchar.h>
#include <stdio.h>
#include <Winbase.h>
DWORD sendData (const char* data, DWORD size)
antonio-petricca / ajax.js
Created Aug 9, 2019 — forked from franz-josef-kaiser/ajax.js
AJAX in WordPress. Class based example.
View ajax.js
( function( $, plugin ) {
"use strict";
// Working with promises to bubble event later than core.
$.when( someObjectWithEvents ).done( function() {
console.log( 'AJAX request done.' );
} )
.then( function() {
setTimeout( function() {
console.log( 'AJAX requests resolved.' );
antonio-petricca /
Created Aug 5, 2019 — forked from Ryanb58/
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
v3.7.0-243-gf26e75a186 []
v3.7.0-229-g087f28e29d []
View weblogic-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-ejb-jar xmlns:wls=""

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.


antonio-petricca / Ubuntu install kernel -dbgsym
Created Sep 4, 2018 — forked from NLKNguyen/Ubuntu install kernel -dbgsym
Ubuntu - Install Debug Symbol Package (-dbgsym) for the current Linux kernel
View Ubuntu install kernel -dbgsym
codename=$(lsb_release -c | awk '{print $2}')
sudo tee /etc/apt/sources.list.d/ddebs.list << EOF
deb ${codename} main restricted universe multiverse
deb ${codename}-security main restricted universe multiverse
deb ${codename}-updates main restricted universe multiverse
deb ${codename}-proposed main restricted universe multiverse
sudo apt-key adv --keyserver --recv-keys ECDCAD72428D7C01
sudo apt-get update
antonio-petricca /
Created Aug 14, 2018 — forked from gitaarik/
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.