Skip to content

Instantly share code, notes, and snippets.

View PatMurrayDEV's full-sized avatar

Pat Murray PatMurrayDEV

View GitHub Profile
@PatMurrayDEV
PatMurrayDEV / key.md
Created February 28, 2019 02:45
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@PatMurrayDEV
PatMurrayDEV / card.html
Created January 7, 2019 07:48
Stripe Tip Jar
<div class="card ">
<h1>Tip Jar</h1>
<p>Almost everything I make is from a labour of love, provided free to you. If my projects have provided
you value and you wish to say thanks, that's super awesome!</p>
<div class="radio-tile-group">
<div class="input-container" style="margin-left: 0;">
<input id="500" class="radio-button" type="radio" name="amountradio" value="500" onclick="amountChanged();" />
<div class="radio-tile">
<label for="500" class="radio-tile-label">$5</label>
</div>
@PatMurrayDEV
PatMurrayDEV / gist:8eaa0ee4d5e5d45f535ed3e2ef1237fb
Created November 25, 2018 23:18 — forked from rmondello/gist:b933231b1fcc83a7db0b
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

This is the process I used to create a CSV file of his credentials in the format “example.com,user,pass”. This portable format would be pretty easy to import into 1Password or Safari in the future.

The way I went about this isn’t great; it opens up more opportunities for apps to control one’s Mac through Accessibility APIs, it writes plaintext passwords to disk, and it could use some cleaning up. A better approach might leverage the security command line tool that ships with OS X. That said, I found this method to be a fun illustration of what’s possible us

@PatMurrayDEV
PatMurrayDEV / open_graph.rb
Last active October 6, 2018 23:49
Dynamically Generated Open Graph Images in Jekyll
require 'rmagick'
require 'rickshaw'
module Jekyll
class OGFilter < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@text = text
background: linear-gradient(#ffffff 50%, rgba(255,255,255,0) 0) 0 0,
radial-gradient(circle closest-side, white 50%, rgba(255,255,255,0) 0) 0 0,
radial-gradient(circle closest-side, white 50%, rgba(255,255,255,0) 0) 55px 0,
radial-gradient(circle closest-side, white 30%, rgba(255,255,255,0) 0) 110px 0,
radial-gradient(circle closest-side, white 45%, rgba(255,255,255,0) 0) 165px 0,
radial-gradient(circle closest-side, white 45%, rgba(255,255,255,0) 0) 330px 0 #48B;
background-size:220px 200px;
background-repeat:repeat-x;
@PatMurrayDEV
PatMurrayDEV / tweet_280_chars.md
Created September 28, 2017 01:35 — forked from mannynotfound/tweet_280_chars.md
tweet with 280 characters
@PatMurrayDEV
PatMurrayDEV / my.css
Created September 26, 2017 05:31 — forked from anonymous/my.css
CSS Gradient Animation
background: linear-gradient(222deg, #d3555c, #f48d3a, #fdc753, #70bc53, #249cd5, #9d61a4);
background-size: 1200% 1200%;
-webkit-animation: GradientScroll 30s ease infinite;
-moz-animation: GradientScroll 30s ease infinite;
-o-animation: GradientScroll 30s ease infinite;
animation: GradientScroll 30s ease infinite;
@-webkit-keyframes GradientScroll {
    0%{background-position:90% 0%}
    50%{background-position:11% 100%}
    100%{background-position:90% 0%}
@PatMurrayDEV
PatMurrayDEV / Change iTunes Count.scpt
Last active June 29, 2020 07:46
Manually update play count for songs in iTunes
tell application "iTunes"
set sel to selection
repeat with track in sel
set trackname to the name of track
set dialog_answers to display dialog "Enter a new play count for " & trackname & ":" default answer ""
set newcount to text returned of dialog_answers as integer
if button returned of dialog_answers is "OK" then
set played count of t to newcount
end if
end repeat
<!DOCTYPE html>
<html>
<head>
<title>DriveSafe</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Base css, but you'll likely want to keep them -->
<link rel="stylesheet" href="css/reset.css" type="text/css">
<!-- Your custom files -->
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.