Skip to content

Instantly share code, notes, and snippets.

View bennythejudge's full-sized avatar

Benedetto Lo Giudice bennythejudge

View GitHub Profile
@sebz
sebz / grunt-hugo-lunrjs.md
Last active April 29, 2024 16:44
hugo + gruntjs + lunrjs = <3 search
@so0k
so0k / kubectl.md
Last active April 25, 2024 12:40
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@timja
timja / jenkins-dump-credentials.groovy
Last active April 4, 2024 14:23
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")
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@daniellevass
daniellevass / android_material_design_colours.xml
Last active March 26, 2024 15:48
Android Material Design Colours
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@initcron
initcron / jenkins_script_console.md
Last active March 26, 2024 11:58
Jenkins Script Tutorial

Jenkins Script Console Tutorial

Jenkins script console allows one to run groovy scripts/code to automate jenkins setup e.g installing plugins, setting configuration parameters. These groovy scripts can be run either through the web ui, or event loaded as scripts using curl from command line. With these groovy scripts, jenkins configurations can be completely automated.

Lets explore this script console and learn how to write/load simple scripts.

Exploring script console

From the jenkins UI, choose Jenkins => Manage Jenkins => Script Console . You should see script console installed, in which run the following,

@jwill
jwill / MemeMaker.html
Last active January 23, 2024 23:33
Starter code for Meme Maker
<!DOCTYPE html>
<html>
<head>
<title>MemeMaker-Simple</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<style>
@Tynael
Tynael / README.md
Last active January 22, 2024 01:06
How to use npx to run gist based scripts
#!/bin/bash
# SPDX-License-Identifier: MIT
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Lockable script boilerplate
# Split all objects and pass them to each filter below
# Create/Delete Namespace
(select(.verb == "create" and .objectRef.resource=="namespaces") |
"[" + .stageTimestamp + "] " + "Namespace Created: name=" + .objectRef.name),
(select(.verb == "delete" and .objectRef.resource=="namespaces") |
"[" + .stageTimestamp + "] " + "Namespace Deleted: name=" + .objectRef.name),
# Create/Delete Deployment