Skip to content

Instantly share code, notes, and snippets.

View james-Ballyhoo's full-sized avatar

James james-Ballyhoo

  • Ballyhoo
View GitHub Profile
@james-Ballyhoo
james-Ballyhoo / backup-bitbucket.js
Created April 11, 2022 15:35
Bitbucket full backup script (deno)
/**
* Bitbucket bulk backup script using Deno.
*
* Backs up all the repos in a workspace to a mirror
* note: Use an app password scoped to read repo only
* workspace is the url slug for your username/company/group etc
*
* Should also update existing bare repos that are found.
*
* Released under MIT License, use at own risk
@james-Ballyhoo
james-Ballyhoo / critcss.snippet.js
Created September 18, 2015 08:34
Based off of https://gist.github.com/PaulKinlan/6284142 , but with support for media queries and dumps css to a textarea in a panel stuck to the top of the page. Only tested in Chrome, uses height of window to determine "critical path".
(function(){
if(document.querySelector("#_CRIT_CSS")){return;}
var container = document.createElement("div");
container.id = "_CRIT_CSS";
container.innerHTML = '<textarea cols=80 rows=20></textarea><button id="CRIT_FIND">Find Critical CSS</button><button id="CRIT_CLOSE">Exit</button>';
container.style.position = "fixed";
container.style.top = 0;
container.style.left = 0;
container.style.right = 0;
container.style.backgroundColor = "#FFF";