Skip to content

Instantly share code, notes, and snippets.

@antonio-petricca
antonio-petricca / demo.txt
Created December 22, 2022 10:08 — forked from MicahElliott/demo.txt
Display all the possible toilet fonts for a string.
banner
### ###
# # # # # ###### ## #### #### # # ###
# # # # # # # # # # # # # ###
# # # #### ##### # # #### # # # #
# # # # # # ###### # # # #
# # # # # # # # # # # # # # ###
### ###### # # # ###### # # #### #### # # ###
@antonio-petricca
antonio-petricca / examples.sh
Created December 22, 2022 09:57 — forked from LunaCodeGirl/examples.sh
Figlet how to and examples
figlet "I've got something to say"
figlet -f thick "Make Tech ASCIIer"
date | figlet -f basic
@antonio-petricca
antonio-petricca / WeblogicREST-Examples
Created September 16, 2021 13:22 — forked from AKSarav/WeblogicREST-Examples
DeploymentTasks-WeblogicREST
deploy an application
---------------------
curl -v \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d "{
name: 'mwiapp',
applicationPath : '/apps/oracle-weblogic/applications/mwiapp.war',
targets: ['mwiCluster1'],
@antonio-petricca
antonio-petricca / keep-jenkins-plugins-uptodate.groovy
Created April 28, 2020 17:35 — forked from alecharp/keep-jenkins-plugins-uptodate.groovy
Simple groovy script to upgrade active plugins when new versions are available
jenkins.model.Jenkins.getInstance().getUpdateCenter().getSites().each { site ->
site.updateDirectlyNow(hudson.model.DownloadService.signatureCheck)
}
hudson.model.DownloadService.Downloadable.all().each { downloadable ->
downloadable.updateNow();
}
def plugins = jenkins.model.Jenkins.instance.pluginManager.activePlugins.findAll {
it -> it.hasUpdate()
@antonio-petricca
antonio-petricca / workbench.colorCustomizations.json
Created April 27, 2020 07:59 — forked from jacklorusso/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.
"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
antonio-petricca / jenkins-set-url-and-email.groovy
Created March 5, 2020 13:32 — forked from ivan-pinatti/jenkins-set-url-and-email.groovy
Jenkins - Set URL and email via groovy script - #jenkins #groovy
#!groovy
// imports
import jenkins.model.Jenkins
import jenkins.model.JenkinsLocationConfiguration
// parameters
def jenkinsParameters = [
email: 'Jenkins Admin <admin@jenkins.com>',
url: 'https://ci.jenkins.com:8083/'
@antonio-petricca
antonio-petricca / usb.cpp
Created September 30, 2019 14:12 — forked from shahpoojan/usb.cpp
A code to send data on the USB port for Windows
#include <iostream>
#include <string>
#include <Windows.h>
#include <tchar.h>
#include <stdio.h>
#include <Winbase.h>
HANDLE hCom;
DWORD sendData (const char* data, DWORD size)
@antonio-petricca
antonio-petricca / ajax.js
Created August 9, 2019 15:30 — forked from franz-josef-kaiser/ajax.js
AJAX in WordPress. Class based example.
( 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
antonio-petricca / install.md
Created August 5, 2019 16:52 — forked from Ryanb58/install.md
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
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-ejb-jar xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
http://xmlns.oracle.com/weblogic/weblogic-ejb-jar
http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.2/weblogic-ejb-jar.xsd">
<!--weblogic-version:10.3.6-->
<wls:weblogic-enterprise-bean>
<wls:ejb-name>Calculator</wls:ejb-name>