Skip to content

Instantly share code, notes, and snippets.

View extratone's full-sized avatar
🗿
iOS Keyboard Shortcuts and E D I T O R I A L G I T , BITCH!

David Blue extratone

🗿
iOS Keyboard Shortcuts and E D I T O R I A L G I T , BITCH!
View GitHub Profile
.sri-group,
.search-result,
.scene {
background-color: #1e2028;
border-radius: 12px;
}
.scene {
padding: 1rem;
}
@extratone
extratone / debian.sh
Created January 12, 2024 21:11 — forked from titulus/debian.sh
debian
#nodejs
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && sudo apt-get install -y nodejs
#mongodb
sudo apt-get install dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \
&& echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list \
&& sudo apt-get update && sudo apt-get install -y mongodb-org \
&& sudo service mongod start && sudo systemctl enable mongod.service
@extratone
extratone / url-regex-tutorial.md
Created November 29, 2023 06:52 — forked from mambru82/url-regex-tutorial.md
regex tutorial for URL matching

Matching a URL using regular expressions - a tutorial

The following gist gives a thorough description of the central components in matching a given URL utilizing regular expressions in Javascript.

Summary

Regex uses a sequence of characters to define a specific search pattern. In the URL matching regex, regex matches any valid URL.

/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
@extratone
extratone / return1Writer.js
Created November 29, 2023 01:12 — forked from philgruneich/return1Writer.js
Returns to 1Writer and replaces the selection with a Markdown link from the Safari page.
javascript:window.location='onewriter://x-callback-url/replace-selection?text='+encodeURIComponent('%5B%5D('+location.href+'%20%5C''+document.title+'%5C')')
@extratone
extratone / remove-emoji.py
Created November 12, 2023 13:08 — forked from slowkow/remove-emoji.py
Remove all traces of emoji from a text file.
#!/usr/bin/env python
"""
Remove emoji from a text file and print it to stdout.
Usage
-----
python remove-emoji.py input.txt > output.txt
"""
@extratone
extratone / grabicon.rb
Created November 3, 2023 05:06 — forked from ttscoff/grabicon.rb
Grab an iOS or Mac app icon from local version or iTunes search
#!/usr/bin/env ruby -W1
# frozen_string_literal: true
# Mac only
#
# Usage: grabicon.rb SEARCH TERMS [%[small|medium|large] [@[mac|ios|iphone|ipad]]
# If the search terms match a local app, that app's icon will be extracted and converted to PNG
# If the search terms don't match a local app, iTunes will be searched
# If the search terms end with "@mac", "@iphone", "@ipad", or "@ios", iTunes will be searched for a match
# If the search terms end with "%large", "%medium", "%small", or "%XXX" icon will be scaled to size
@extratone
extratone / convert.md
Created September 29, 2023 23:34 — forked from maximebories/convert.md
FFmpeg command to convert webm to mp4 video files
ffmpeg -i input.webm -c:v libx264 -preset slow -crf 22 -c:a aac -b:a 128k output.mp4

This ffmpeg command converts a .webm video file to a standard .mp4 file using the libx264 codec for video, aac codec for audio, and a CRF value of 22. The preset is set to 'slow' for higher quality encoding, and the audio bitrate is set to 128 kbps.

@extratone
extratone / python-upgrade-package.md
Last active October 10, 2023 03:12 — forked from hritik5102/python-upgrade-package.md
How To Update All Python Packages

Python Package Upgrade Checklist

Get a list of all the outdated packages

$ pip list --outdated

Open a command shell by typing ‘powershell’ in the Search Box of the Task bar
Update All Python Packages On Windows

@extratone
extratone / gist:93d22576b43c72024027c7ac19ad40f7
Created September 21, 2023 05:08 — forked from ChewingPencils/gist:2777049
External Drafts Bookmarklet js file.
/*
Drafts App Bookmarklets (http://agiletortoise.com/drafts)
Author: Sean Korzdorfer
Date: 13:51:29 Wed May 23 2012
Re: https://gist.github.com/gists/2579288
Most of the Date functions used snippets I created from:
http://www.webdevelopersnotes.com/tips/html/10_ways_to_format_time_and_date_using_javascript.php3
*/
@extratone
extratone / craftcapture.js
Last active April 19, 2024 19:20 — forked from kepano/obsidian-web-clipper.js
Forked from "Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)" and adapted for craft.io
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "davod";
/* Optional folder name such as "Clippings/" */