Skip to content

Instantly share code, notes, and snippets.

@joelanman
joelanman / jquery-tabs
Created September 16, 2013 11:11
generic tabs in jquery
$('.tab a').on('click', function(e){
e.preventDefault();
var $this = $(this),
target = $this.attr('data-target'),
$tabWrap = $this.closest('.tab-wrap'),
$thisTab = $this.closest('.tab');
$tabWrap.find('.tab').removeClass('selected');
@joelanman
joelanman / timemachine.py
Created June 18, 2015 09:38
roll back multiple repos to the same date
#!/usr/bin/env python
import subprocess
#Places variables into a list/array
repos = [
"ida-build-scripts",
"ida-compliance-tool",
"ida-frontend",
"ida-hub",
"ida-hub-acceptance-tests",
body{
font-family: Helvetica;
}
.content{
max-width: 900px;
margin: auto !important;
}
.thing{
https://www.dropbox.com/s/ifztnyd2ml35g6k/virtualbox.stupidproxy?dl=0
{% extends "layout.html" %}
{% block page_title %}
GOV.UK prototype kit
{% endblock %}
{% block content %}
<main id="content" role="main">
@joelanman
joelanman / uk-government-slack-usage-guide.md
Last active August 2, 2017 08:25
UK Government Slack Usage Guide

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.

drawThing = function(data){
// you have access to data here
}
getThing = function(done){
$.ajax({
url: "moop.com",
success: function(response){
data = response.data;
done(data);
<form action="{{baseURL}}/recover-account">
<input type="hidden" name="requestId" value="{{requestId}}">
<input type="hidden" name="request" value="{{request}}">
<div class="inner-block">
<div class="form-group">
<p class="list-intro font-xsmall">Your password must have:</p>
@joelanman
joelanman / install-gm-w-librvg.sh
Last active November 21, 2017 19:16 — forked from whyvez/install-gm-w-librvg.sh
Installs ImageMagick --with-librsvg on Amazon Linux
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig
export PATH=/usr/bin:$PATH
export LDFLAGS=-L/usr/lib64:/usr/lib
export LD_LIBRARY_PATH=/usr/lib64:/usr/lib
export CPPFLAGS=-I/usr/include
sudo yum-config-manager --enable epel
#sudo yum update -y
sudo yum install -y gcc gcc-c++ glib2-devel.x86_64 libxml2-devel.x86_64 libpng-devel.x86_64 \
libjpeg-turbo-devel.x86_64 gobject-introspection.x86_64 gobject-introspection-devel.x86_64
@joelanman
joelanman / routes.js
Last active June 29, 2018 09:42
how to use marked
const express = require('express')
const router = express.Router()
const marked = require('marked')
// Route index page
router.get('/', function (req, res) {
res.render('index')
})
// Add your routes here - above the module.exports line