Skip to content

Instantly share code, notes, and snippets.

View jossemarGT's full-sized avatar
:octocat:
Hacking around

Jossemar Cordero jossemarGT

:octocat:
Hacking around
View GitHub Profile
@jossemarGT
jossemarGT / README.md
Last active October 26, 2022 03:39
GH Candle stash

Hey, I'm trying something for GH Candle let's see if it works ;)

@jossemarGT
jossemarGT / cms_gerate_login.groovy
Last active May 2, 2018 05:37
Generate CMS login session cookie
@Grab(group='net.razorvine', module='pyrolite', version='4.20')
@Grab(group='com.jossemargt', module='cookie-twist', version='0.3.1')
// HMAC SHA256 sign
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.Formatter;
import javax.crypto.Mac;
@jossemarGT
jossemarGT / jenkins-queue-drain.sh
Created September 26, 2016 16:52
Drains jenkins build queue using curl and jq
#!/bin/bash
JENKINS_URL=$1
HINT=${2-master}
USER=${3-jenkins}
JENKINS_TOKEN=$4
REMINDER=`mktemp /tmp/${HINT}.XXXXX`
echo "ID's will be printed on ${REMINDER}"
@jossemarGT
jossemarGT / npm-updated.sh
Last active August 15, 2016 20:33
Tired of those "outdated" warns on your node.js project, now you have a lazy way to updated your modules. (Use with caution)
#!/bin/bash
# Force update for your local node modules, use with caution though
OUTDATED=`npm outdated`
while IFS=$'\n' read -ra item; do
if [[ $item == *"Package"* ]]; then
continue
fi