Skip to content

Instantly share code, notes, and snippets.

View drazisil's full-sized avatar
💭
Always Online - Somewhere

Molly Crendraven drazisil

💭
Always Online - Somewhere
View GitHub Profile
@drazisil
drazisil / bookmarklet.js
Created November 24, 2022 13:03 — forked from bramus/bookmarklet.md
Mastodon User Page Bookmarklet
javascript:(function(){
const MY_MASTO_LOCAL_DOMAIN = 'social.drazisil.com'; /* 👈 Change this value */
const MY_MASTO_WEB_DOMAIN = MY_MASTO_LOCAL_DOMAIN; /* 👈 Only change this value if your Masto host is hosted an different domain than the LOCAL_DOMAIN */
function tryAndGetUserName() {
/* Profile with a moved banner (e.g. https://mastodon.social/@bramus): follow that link */
const userNewProfile = document.querySelector('.moved-account-banner .button')?.getAttribute('href');
if (userNewProfile) {
return userNewProfile.substring(2);
}
@drazisil
drazisil / config.yml
Created April 9, 2019 11:15 — forked from lokst/config.yml
Sample steps to manually update Xcode to latest 10.2 version (not necessary once the Xcode 10.2 GA version image has been released on CircleCI)
version: 2
jobs:
build:
macos:
xcode: "10.2.0"
steps:
- run:
name: Update Xcode to latest 10.2 version
command: |
# Requires setting the XCODE_INSTALL_USER and XCODE_INSTALL_PASSWORD
@drazisil
drazisil / pretty-json.php
Last active October 12, 2021 16:15
Pretty-print a JSON string in PHP.
<?php
/**
* Formats a JSON string for pretty printing
*
* @param string $json The JSON to make pretty
* @param bool $html Insert nonbreaking spaces and <br />s for tabs and linebreaks
* @return string The prettified output
* @author Jay Roberts
*/