Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View paulmsmith's full-sized avatar

Paul Smith paulmsmith

View GitHub Profile
@paulmsmith
paulmsmith / inlinesnippet.html
Created August 10, 2020 12:39
inline css snippet
<style type="text/css">.prose { font-size: 2rem; }
.c-important-message {
padding: 2rem;
margin: 0 0 2rem 0;
background: rgba(229, 6, 88, 0.1);
}
.c-important-message__title {
color: #e50658;
margin: 0 0 1rem 0 !important;
@paulmsmith
paulmsmith / slice.scss
Last active December 12, 2018 13:21
slice sass
/* Tools - Utils
------------------------- */
// Functions
// -------------------------
/// @function t-rem
/// Returns a single or series of values represented as rem unit(s).
///
@paulmsmith
paulmsmith / test
Created February 27, 2018 13:27
apk link
https://www.apkmirror.com/apk/google-inc/chrome/chrome-46-0-2490-76-release/chrome-46-0-2490-76-android-4-1-android-apk-download/
@paulmsmith
paulmsmith / app.js
Created October 25, 2017 14:56 — forked from dstroot/app.js
Gulp, BrowserSync, Node, and Nodemon all working in harmony. ;)
/**
* World's simplest express server
* - used to serve index.html from /public
*/
var express = require('express');
var serveStatic = require('serve-static');
var app = express();
app.use(serveStatic(__dirname + '/public'));
@paulmsmith
paulmsmith / screenshotcommand.txt
Created September 18, 2017 11:07
screenshot via terminal. -T is the delay you need
screencapture -T 10 ~/Desktop/screenshot.png
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo 'Hg' && return
echo '$'
}
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}

UK Government Slack usage guide

Slack is a messaging tool for teams. This is a quick guide to help new users get the most out of Slack.

Remember that under the Freedom of Information Act any recorded information, including digital communication, can be requested by a member of the public.

Set up your profile

Your profile helps other users around government know who you are, and helps them find you easily if they're looking for you.

@paulmsmith
paulmsmith / rssconsume.php
Created July 31, 2017 14:49
RSS Feed consume PHP
<?php
$xml_feed = new DOMDocument();
$xml_feed->load('http://public.sheltermanager.com/animals/gw1124/rss.xml');
$feed_items = array();
foreach ($xml_feed->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
@paulmsmith
paulmsmith / draft.md
Created April 25, 2017 13:16 — forked from mpj/draft.md
Feedback for episode draft: 7 critical traits for a normal programmer

7 critical traits for a normal programmer

EARLY DRAFT FOR NEXT EPISODE, PLEASE PROVIDE FEEDBACK

This week I tweeted and tooted this question:

”What do you think are critical traits in a programmer? NOT to be super 10x or anything - just to feel good and function well professionally.”

Link to full threads here: [https://twitter.com/mpjme/status/855691565460848640]

@paulmsmith
paulmsmith / contrast-grid-url.js
Created February 20, 2017 07:36 — forked from james-nash/contrast-grid-url.js
Generate EightShapes Contrast Grid URL from Brand.ai styles
/*
Generate EightShapes Contrast Grid URL from Brand.ai styles
Usage:
node contrast-grid-url.js [URL]
[URL] should be the URL to your Brand.ai JSON styles data export. Note that
you may need to wrap the URL in quotes.