Skip to content

Instantly share code, notes, and snippets.

View cdevroe's full-sized avatar
:octocat:
Probably writing.

Colin Devroe cdevroe

:octocat:
Probably writing.
View GitHub Profile
@cdevroe
cdevroe / set-guid-to-permalink.php
Created February 1, 2024 13:55
A WordPress filter to change a post's GUID from ?p=int to its permalink (use with caution)
@cdevroe
cdevroe / readme.md
Last active February 15, 2023 02:20
YouTube pop-up Bookmarklet

YouTube Pop-up Bookmarklet

I forget where I found this originally (sorry). And I've modified it slightly over the years. But if you're on YouTube in a desktop browser and you'd like to have the video in a small pop-up window, tap this bookmarklet and it automatically creates the perfectly sized window for you.

How to install

  1. Create a new bookmark with any URL.
  2. Edit that bookmark in your browser, delete the URL that is there, and paste the code you see in the JS file into the Location field.

You're welcome / Colin

@cdevroe
cdevroe / gist:11399775
Created April 29, 2014 13:07
Shortcodes Ultimate list of Shortcodes
[su_heading size="20" margin="50"]This Is A Heading[/su_heading]
[su_tabs][su_tab title="Tab One"][su_custom_gallery source="media: 1274,1202,917"][/su_tab] [su_tab title="Title 2"][su_quote cite="Colin Devroe" url="http://cdevroe.com"]I love kayaking.[/su_quote][/su_tab] [su_tab title="Title 3"][su_dummy_image][/su_tab][/su_tabs]
[su_accordion][su_spoiler]Content[/su_spoiler] [su_spoiler]Content[/su_spoiler] [su_spoiler]Content[/su_spoiler][/su_accordion]
[su_divider]
[su_spacer]
@cdevroe
cdevroe / DailyNote.applescript
Created November 19, 2020 16:47
New Daily note in Simplenote via AppleScript
-- create a string from the current date
set todaysDate to (current date) as string
-- open simplenote and make it the active window
tell application "Simplenote"
activate
end tell
-- use system events to
-- "type" CMD+N
@cdevroe
cdevroe / docker-compose.yml
Created March 30, 2021 14:22
Simple Apache server with Docker Compose
version: '3.3'
services:
httpd:
image: httpd:2.4
volumes:
- /YOUR/LOCAL/FILE/SYSTEM/DIRECTORY:/usr/local/apache2/htdocs/
ports:
- 8080:80
restart: always
@cdevroe
cdevroe / docker-compose.yml
Created March 4, 2021 16:50
Docker Compose for WordPress with theme mapped (example for my blog)
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
@cdevroe
cdevroe / RSS2Twitter.php
Created December 6, 2009 19:56
A PHP script to take an RSS feed and Twitter the links.
<?php
/*
RSS to Twitter using PHP.
By: Colin Devroe
http://cdevroe.com/
http://github.com/cdevroe
Written on December 6, 2009 while watching
Star Trek III: The Search for Spock.
@cdevroe
cdevroe / gist:bce6d8ac8b20751de603179a1f8c8ff2
Created October 2, 2020 11:17
Photographers exhibited by John Szarkowski at MoMA
- Jacques Henri Lartique
- Andre Kertesz
- Elliot Erwitt
- Dorothea Lange
- Joel Meyerowitz
- Brassai
- Bill Brandt
- Atget
- Ej Bellocq
- Berenice Abbott
@cdevroe
cdevroe / PhotographyBlogs.opml
Last active September 15, 2020 11:41
An OPML file of Photography related blogs - Inspired by Jim Grey
<?xml version="1.0" encoding="UTF-8"?>
<!-- OPML generated by NetNewsWire -->
<opml version="1.1">
<head>
<title>PhotographyBlogs.opml</title>
</head>
<body>
<outline text="Photography" title="Photography">
<outline text="Colin Devroe" title="Colin Devroe" description="" type="rss" version="RSS" htmlUrl="http://cdevroe.com/" xmlUrl="http://cdevroe.com/feed/"/>
<outline text="Christopher May Fine Art Photography" title="Christopher May Fine Art Photography" description="" type="rss" version="RSS" htmlUrl="https://christophermayphotography.com/" xmlUrl="https://christophermayphotography.com/feed/"/>
@cdevroe
cdevroe / move_files.php
Last active April 13, 2020 17:33
Look at files in a directory, move them into new directories based on Date Created
<?php
/*
Created by Colin Devroe
cdevroe.com
*/
// Help
if ( isset($argv[1]) && ($argv[1] == '-h' || $argv[1] == '-help') ) :
print 'Colin\'s Photo Backup Utility' . "\n";