Skip to content

Instantly share code, notes, and snippets.

@ffub
ffub / index.html
Created June 5, 2022 18:18
One-pager
<!doctype html>
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600&display=swap" rel="stylesheet">
<title>Stephen Tomlinson</title>
</head>
@ffub
ffub / Quit All.applescript
Created May 9, 2021 15:21
Quit all applications on a Mac, with the option to leave the front most open
-- get list of open apps
tell application "System Events"
set allApps to displayed name of (every process whose background only is false) as list
set activeApp to name of first application process whose frontmost is true
set exclusions to {"Finder", "LaunchBar"}
end tell
set {button returned:myQuery} to display dialog "Which applications do you want to quit?" with title "Quit All" with icon caution buttons {"Cancel", "Quit All", "Keep Active Open"}
if myQuery is "Quit All" then
@ffub
ffub / index.html
Last active September 8, 2020 21:15
One-pager
<!DOCTYPE html>
<html>
<head>
<title>Stephen Tomlinson - UX Designer</title>
<style>
body {
background: rgb(20,20,25);
color: white;
font-family: "IBM Plex Mono";
@ffub
ffub / clock.html
Created March 15, 2018 13:07 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
@ffub
ffub / _underline.scss
Created June 15, 2015 20:11
Consistent underlines using gradients
/*
* Consistent underlines using gradients
* https://medium.com/designing-medium/crafting-link-underlines-on-medium-7c03a9274f9
*/
@mixin underline($colour:currentColor, $line-offset:1, $line-size:0.1) {
text-decoration: none;
background-repeat: repeat-x;
background-size: #{$line-size}em #{$line-size}em;
background-position: 0 #{$line-offset}em;
@ffub
ffub / partial.php
Created March 22, 2015 16:11
Partial function to limit include variable scope
/*
* Function name
*
* Super-crude way of limiting the variable scope of includes
*
* @file (string) The file to be included
* @vars (array) The variables to be available in the include
*/
function partial($file, $vars) {
@ffub
ffub / PaymentGatewayPayPal.module
Last active January 26, 2016 08:02
A basic Processwire module to send payments to PayPal and process the IPN response using the website payments standard API.
<?php
class PaymentGatewayPayPal extends WireData implements Module, ConfigurableModule {
/*
* Module details, defaults and initialisation
*
*/
public static function getModuleInfo()
@ffub
ffub / gist:1084424
Created July 15, 2011 10:10
Balsamiq HTML export
#!/usr/bin/php
<?php
error_reporting(E_ALL);
if (count($argv) <= 1) {
print("usage createMockup src_dir dst_dir images_dir\n");
print("\tsrc_dir : dir where all bmml file are\n");
print("\tdst_dir : dir where write all html files\n");
print("\timages_dir : dir where all export mockup png are (will be copied to the \$dst_dir/images directory)\n");
exit(1);
}