Skip to content

Instantly share code, notes, and snippets.

View paulmsmith's full-sized avatar

Paul Smith paulmsmith

View GitHub Profile
@paulmsmith
paulmsmith / keymap.cson
Created January 28, 2016 12:29
emmet + nunjucks in atom with snippets
'atom-text-editor[data-grammar="text html nunjucks"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
'atom-text-editor[data-grammar="source nunjucks"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab'
#https://github.com/atom/autocomplete-plus/issues/86#issuecomment-82661027
'atom-text-editor.autocomplete-active:not([mini])':
'tab': 'autocomplete-plus:confirm'
@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
@paulmsmith
paulmsmith / nas_commands.txt
Created January 25, 2014 00:52
useful NAS unix commands
#recursively extract rars from subdirectoes to current dir
/opt/bin/find -name '*.rar' -exec unrar e '{}' ';'
#replace space with a dot in file names (and folders)
ls -1 | while read a; do mv "$a" `echo $a | sed -e 's/\ /\./g'`; done
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,