Skip to content

Instantly share code, notes, and snippets.

Avatar

Anthony Craig ToniWonKanobi

View GitHub Profile
@ToniWonKanobi
ToniWonKanobi / tweetLatestPost.js
Created Mar 29, 2018
My Edited Version of Casey Liss's Auto Tweet Posting in the Camel Blogging Engine
View tweetLatestPost.js
// Automatic posting to Twitter
function tweetLatestPost() {
if (twitterClient !== null && typeof(process.env.TWITTER_CONSUMER_KEY) !== 'undefined') {
twitterClient.get('statuses/user_timeline', {screen_name: twitterUsername}, function (error, tweets) {
if (error) {
console.log(JSON.stringify(error, undefined, 2));
return;
}
var lastUrl = null, i = 0;
@ToniWonKanobi
ToniWonKanobi / custom.scss
Last active Nov 16, 2020
Custom Stylesheet for Desktop Safari
View custom.scss
// Variables
// Color for <code> and <pre>
$lighterGray: lighten(black, 25%);
// Background color for <code>
$lightGray: lighten(lightgray, 10%);
// Border color for <pre> and <code>
$darkGray: darken(lightgray, 3%);
// Background color of YouTube
$darkerGray: darken(gray, 35%);
View keybase.md

Keybase proof

I hereby claim:

  • I am toniwonkanobi on github.
  • I am toniwonkanobi (https://keybase.io/toniwonkanobi) on keybase.
  • I have a public key whose fingerprint is B374 18F5 DDDC AA75 3573 CA49 CA8A 96FE 3907 8AE0

To claim this, I am signing this object:

@ToniWonKanobi
ToniWonKanobi / Slugify.applescript
Last active Feb 15, 2018
Creates a URL-safe string of text from otherwise unsafe text. If you wanted to create a service from this, open an Automator project that grabs the clipboard content, then run this AppleScript on said clipboard content, then re-copy the output the clipboard again.
View Slugify.applescript
# What is this?
# This AppleScript takes as input the clipboard content [that is potentially unsafe-for-URLs string of text] (such as a blog post in Title Case)
# The script then creates a URL-safe version
# For example: `This Is a Title of a Post!` --> `this-is-a-title-of-a-post`
# Boomshakalaka
# This is from https://superuser.com/questions/635351/process-clipboard-content-on-mac-os
# You can create an Automater service as well: https://d.pr/i/xtX7kN+