Skip to content

Instantly share code, notes, and snippets.

@angelalejos
angelalejos / install_java_complete.sh
Created February 13, 2023 23:02 — forked from garystafford/install_java_complete.sh
Code for blog post, 'Updating Ubuntu with the Latest Java JDK': http://wp.me/p1RD28-Wq
#!/bin/bash
#################################################################
# author: Gary A. Stafford
# date: 2013-12-17
# source: www.programmaticponderings.com
# description: complete code for install and config on Ubuntu
# of jdk 1.7.0_45 in alteratives automatic mode
#################################################################
@angelalejos
angelalejos / install_java_complete.sh
Created February 13, 2023 23:02 — forked from garystafford/install_java_complete.sh
Code for blog post, 'Updating Ubuntu with the Latest Java JDK': http://wp.me/p1RD28-Wq
#!/bin/bash
#################################################################
# author: Gary A. Stafford
# date: 2013-12-17
# source: www.programmaticponderings.com
# description: complete code for install and config on Ubuntu
# of jdk 1.7.0_45 in alteratives automatic mode
#################################################################
@angelalejos
angelalejos / pipeline.groovy
Created June 15, 2020 20:28 — forked from lvthillo/pipeline.groovy
Scripted Jenkins pipeline which uses Kubernetes plugin
podTemplate(label: 'mypod', containers: [
containerTemplate(name: 'git', image: 'alpine/git', ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', command: 'cat', ttyEnabled: true),
containerTemplate(name: 'docker', image: 'docker', command: 'cat', ttyEnabled: true)
],
volumes: [
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'),
]
) {
node('mypod') {
@angelalejos
angelalejos / httpstatus
Created December 30, 2019 15:23 — forked from rsvp/httpstatus
httpstatus : bash script to get HTTP response code with optional status message (includes verbose definitions in comment)
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-08-25
#
# _______________| httpstatus : get HTTP status code
#
# Usage: httpstatus URL [timeout] [--code or --status] [see 4.]
# ^message with code (default)
# ^code (numeric only)
# ^in secs (default: 3)
# ^URL without "http://" prefix works fine.
@angelalejos
angelalejos / gist:ae8d010dfeb5bcc8d0efe36536897cce
Created December 12, 2019 14:42 — forked from jpmens/gist:e4ea94424df16b5268a90c12b7a044df
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@angelalejos
angelalejos / postman-pre-request.js
Created December 10, 2019 22:17 — forked from bcnzer/postman-pre-request.js
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
@angelalejos
angelalejos / openbsd_get_free_usable_memsize.c
Created August 19, 2019 21:15 — forked from leiless/openbsd_get_free_usable_memsize.c
OpenBSD get free/usable memory size programmatically
/*
* Created 190807 lynnl
*
* see:
* https://github.com/openbsd/src/blob/master/usr.bin/systat/uvm.c
* https://github.com/openbsd/src/blob/master/usr.bin/vmstat/vmstat.c
* https://github.com/openbsd/src/blob/master/usr.bin/top/machine.c#L257
* https://github.com/NanXiao/free
*
* man uvm
@angelalejos
angelalejos / post_dmesg_to_nycbug.pl
Created August 14, 2019 00:05 — forked from afresh1/post_dmesg_to_nycbug.pl
This script posts an OpenBSD dmesg to the NYC*BUG archive at http://www.nycbug.org/index.cgi?action=dmesgd
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
use feature 'signatures';
no warnings 'experimental::signatures';
use Sys::Hostname;
use HTTP::Tiny;
@angelalejos
angelalejos / GetIps.groovy
Created June 26, 2019 18:25 — forked from sudharsans/GetIps.groovy
Groovy, AWS CLI, Active Choices Reactive Parameter and Jenkins
// https://stackoverflow.com/questions/48982349/query-aws-cli-to-populate-jenkins-active-choices-reactive-parameter-linux
// Get list of IPS from AWS CLI and populate Active Choices Reactive Parameter
def command = 'aws ec2 describe-instances --filters Name=tag:Name,Values=Test --query Reservations[*].Instances[*].PrivateIpAddress --output text'
def proc = command.execute()
proc.waitFor()
def output = proc.in.text
def exitcode= proc.exitValue()
def error = proc.err.text
@angelalejos
angelalejos / Jenkinsfile
Created June 7, 2019 19:30 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples