Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Dragod's full-sized avatar
🎲
Ma le spegnene?

Fabio Dragod

🎲
Ma le spegnene?
View GitHub Profile
@ebidel
ebidel / unused-html-imports-bookmarket.js
Last active March 16, 2020 03:45
Bookmarklet to help prune unnecessary HTML Imports loaded on a page.
javascript:(function(){'use strict';var _temporalUndefined={};function _temporalAssertDefined(val,name,undef){if(val===undef){throw new ReferenceError(name+' is not defined - temporal dead zone');}return true;}(function(){'use strict';var els=_temporalUndefined;var allCustomElements=_temporalUndefined;var polymerRegisteredElements=_temporalUndefined;var diff=_temporalUndefined;function isCustomEl(el){return el.localName.indexOf('-')!=-1||el.getAttribute('is');}els=[].slice.call(document.querySelectorAll('html /deep/ *')).filter(function(el){return isCustomEl(el);}).map(function(el){return el.getAttribute('is')||el.localName;});allCustomElements=new Set(_temporalAssertDefined(els,'els',_temporalUndefined)&&els);polymerRegisteredElements=Polymer.telemetry.registrations.map(function(el){return el.is;}).filter(function(name){var blacklist=_temporalUndefined;blacklist=['dom-template','array-selector','custom-style'];return(_temporalAssertDefined(blacklist,'blacklist',_temporalUndefined)&&blacklist).indexOf(name)==
@jordangray
jordangray / dabblet.css
Created April 22, 2012 15:03
Triangular prisms with pseudo-elements and transforms
/**
* Triangular prisms with pseudo-elements and transforms
**/
body {
background: #fff;
}
#origin {
transform-style: preserve-3d;
@dphansen
dphansen / boxstarter.ps1
Last active March 12, 2021 18:52 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: David Peter Hansen
# Based on Boxstarter script by Jess Frazelle
# Last Updated: 2017-11-10
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
import argparse
# GET ORDER ID
parser = argparse.ArgumentParser(description='For blog.codeonion.com my visitors!')
parser.add_argument("--argument_to_be_passed", required=True, type=str, help="Please pass a value into --argument_to_be_passed")
args = parser.parse_args()
value = args.argument_to_be_passed
print(value)
; Autoexecute
@jondolan
jondolan / dropdown_terminal.ahk
Created March 6, 2017 03:30
AutoHotkey Windows drop down terminal
;; Jon Dolan ;;
;; V1.0 - March 5th, 2017 ;;
;; Windows emulator for Yakuake/Guake written in AHK (https://autohotkey.com) ;;
;; Provies drop down capabilities to whatever Windows terminal program you please ;;
;; By default, this script uses Bitvise xterm with the hotkey F12 ;;
;; But it is configurable by changing the global variables below ;;
;; To compile this script after changing it to your liking: ;;
@harryi3t
harryi3t / postman-oauth2-refresh-token.js
Created September 20, 2018 18:23
This gist shows how using the pre-request script in Postman, a new Oauth-2 token can be obtained using the a refresh token
/**
** Postman as of the date of this writing does not support auto-refreshing of Oauth-2 tokens.
** This is an exmaple on how in one can refresh their Oauth-2 tokens just using the pre-request scripts.
** Pre-requisites: You need to have a refresh token. You can use the Postman app to get one.
**/
// Set all these variables in an environment or at collection level
let tokenUrl = pm.variables.get('tokenUrl'),
clientId = pm.variables.get('clientId'),
clientSecret = pm.variables.get('clientSecret'),
@Ondreas
Ondreas / _text-shadow-compass-mixin.scss
Created January 27, 2015 17:24
Text-Shadow @mixin | Compass
// ######################################################################
// ##
// text-shadow() ##
// ================================================================= ##
// URL: http://compass-style.org/reference/compass/css3/text-shadow/ ##
// ##
// USAGE: ##
// ----------------------------------------------------------------- ##
// @include text-shadow(1px 1px 2px #333333); ##
// ##
@thereverand
thereverand / install-psu.sh
Last active May 5, 2023 09:09
Install PowerShell Universal as a service on Linux
# ----
# This script will install PowerShell Universal on Linux as a service
# This has been tested on Ubuntu 20.04 (ARM64) on a Raspberry Pi 4
# ----
# Dependencies:
# wget
# unzip
#
# Make sure they are installed
# ----
@justlaputa
justlaputa / jenkins-api.md
Last active September 26, 2023 17:43
Jenkins Json API

jobs

jenkins_url + /api/json?tree=jobs[name,color]

builds

jenkins_url + /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]

last build

@ankurk91
ankurk91 / npm-commands.md
Last active October 22, 2023 12:16
Useful npm commands and tricks

npm v3.10 - ◾

⚠️ This gist is outdated, but most of the commands are still relevant. ⚠️

Update npm itself

npm install -g npm
# Downgrade to a specific version
npm install -g npm@6