ls -al ~/.ssh
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
/** | |
* Generate an image of text | |
* @param {String} text - The text to convert to an image | |
* @param {Object} options - The rendering options of the text and image | |
* @property {String} options.color - The color of the text | |
* @property {Number} options.font_size - The size of the text in pixels | |
* @property {String} options.font_face - The font face to use | |
* @property {String} options.font_style - The font style (normal|italic|oblique|initial|inherit) | |
* @property {String} options.font_variant - The font variant (normal|small-caps|initial|inherit) | |
* @property {String|Number} options.font_weight - The font weight (normal|bold|bolder|lighter|number|initial|inherit) |
(async function(d){ | |
console.clear(); | |
const styles = []; | |
const stylesheets = d.querySelectorAll("link[rel='stylesheet'][href]"); | |
// get all stylesheet urls | |
const stylesheet_urls = [...stylesheets].map(s=>s.href); | |
// fetch the contents of the stylesheets | |
const ss_promises = stylesheet_urls.map(href=>{ | |
return fetch(href).then(s=>s.text()).then(s=>{ | |
return { |
(async function(d){ | |
console.clear(); | |
const styles = []; | |
const stylesheets = d.querySelectorAll("link[rel='stylesheet'][href]"); | |
// get all stylesheet urls *that are on the same domain* | |
const stylesheet_urls = [...stylesheets].map(s=>s.href).filter(uri=>{ | |
uri1 = new URL(uri); | |
var uri2 = new URL(window.location.href); | |
if(uri1.host !== uri2.host) return false; | |
if(uri1.port !== uri2.port) return false; |
class BodyMetrics { | |
constructor(params) { | |
Object.keys(params).forEach(key => { | |
this[key] = params[key]; | |
}); | |
this.results = {}; | |
this.bodyFatPercentage(); | |
this.bodyFatWeight(); | |
this.bodyFatDensity(); | |
} |
function loadImage(src){ | |
return new Promise((r,e)=>{ | |
var img = new Image(); | |
img.onload = ()=>r(img); | |
img.onerror = e; | |
img.src = src; | |
}); | |
} | |
async function scaleAndFitImage(src, w, h) { |
var SelectorGenerator = (function(){ | |
var removed_elements = []; | |
var selectedElement = null; | |
var modalBg = null; | |
var outline = null; | |
var modal = null; | |
var running = false; | |
<?php | |
// Path to the .p8 file downloaded from apple | |
// see: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns#2943371 | |
$authKey = "AuthKey_S97G28Y3JP.p8"; | |
// Team ID (From the Membership section of the ios developer website) | |
// see: https://developer.apple.com/account/ | |
$teamId = 'asdfasdf'; |
/** | |
* Used to find function names or any other strings in sources of a web page. | |
* @param {string} needle - The string to find | |
* @param {boolean} caseMatch - Is search case sensitive? | |
*/ | |
async function shallowSourceSearch(needle, caseMatch = false) { | |
var matches = [], files = []; | |
if (!caseMatch) needle = needle.toLowerCase(); | |
const searchFile = async path => { | |
try { |
#!/usr/bin/env bash | |
REMOTE=$(git config --get remote.origin.url) | |
rm -rf .git | |
git init | |
git add . | |
git commit -m "Deleted repo history" | |
git remote add origin $REMOTE | |
git push -u --force origin master |