Skip to content

Instantly share code, notes, and snippets.

gt3 / customevent-polyfill.js
Last active March 1, 2022 11:50
custom event polyfill for IE 11 (>= 9 really)
View customevent-polyfill.js
// source:
;(function() {
if (typeof window.CustomEvent === "function") return false
function CustomEvent(event, params) {
params = params || { bubbles: false, cancelable: false, detail: undefined }
var evt = document.createEvent("CustomEvent")
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail)
return evt
dasgoll / gist:455522f09cb963872f64e23bb58804b2
Created January 28, 2017 15:42
Jenkins REST API example using crumb
View gist:455522f09cb963872f64e23bb58804b2
Each Jenkins page has a REST API hyperlink at the bottom, this is because each page has its own endpoint.
Click 'Show API Token'
78e21f82a9e137614fef5b9593bcf827 = API Token
curl -s -u goll:78e21f82a9e137614fef5b9593bcf827 http://localhost:8080/crumbIssuer/api/json
augbog / Free O'Reilly
Last active March 2, 2023 23:35
Free O'Reilly Books
View Free O'Reilly

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x should do it)
  3. Run ./ and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
craigbeck / introspection-query.graphql
Created April 6, 2016 20:20
Introspection query for GraphQL
View introspection-query.graphql
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
directives {