Skip to content

Instantly share code, notes, and snippets.

@Pageboy
Pageboy / gist:c80363d97231d8ea584035d86984e6d4
Created March 12, 2017 17:40 — forked from siffring/gist:3130009
Export ExpressionEngine members to CSV
<?php
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=member_export.csv');
header('Pragma: no-cache');
?>
{!--
Exports the EE members in CSV format. This is only accessible to admins and editors.
Does not export members in the banned or guests groups.
@Pageboy
Pageboy / excerpt.html
Created July 31, 2017 08:40 — forked from lukas-h/excerpt.html
Jekyll excerpts for not only posts. For collections and pages: http://himsel.me/blog.html
<div class="row">
{% for page in site.pages %}
<div>
<span>{{ page.title }}</span>
{% assign excerpt = page.content | split: site.excerpt_separator %}
{{ excerpt[0] }}
</div>
{% endfor %}
</div>
#!/usr/bin/env sh
# Steps to fix Atom not updating properly on Mac OS, as described at
# https://discuss.atom.io/t/i-am-unable-to-update-to-the-latest-version-of-atom-on-macos-how-do-i-fix-this/40054
dirs=(/Applications/Atom.app/ ~/Library/Caches/com.github.atom.ShipIt ~/Library/Application\ Support/com.github.atom.ShipIt)
for dir in "${dirs[@]}"; do
echo "$dir"
if [ -d "$dir" ]; then
echo "Exists: $dir"
@Pageboy
Pageboy / material-design-breakpoints.css
Created January 29, 2018 07:39 — forked from eyecatchup/material-design-breakpoints.css
CSS media queries based on the breakpoint guidance published by the Material Design team. http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoint
/* Material Design Adaptive Breakpoints */
/*
Below you'll find CSS media queries based on the breakpoint guidance
published by the Material Design team. You can choose to use, customise
or remove these breakpoints based on your needs.
http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoints
*/
/* mobile-small */
@Pageboy
Pageboy / scroller.js
Last active April 27, 2018 12:01
If you have a scroller across a spread
// run this once the page has loaded
window.onload = function(){
// find out if there is more than one scroller div over the spread
scrollers = document.getElementsByClassName("scroller").length;
if (scrollers > 1) {
var css = document.createElement("style");
css.type = "text/css";
// hide the second main div of the body
// make the width of the first main div the same as the viewport
/*
adding a scrolling text box to an InDesign page
You need to create a text boc and under export options name the as a div
with a class name of scroller
Then add this CSS file when exportin to the fixed layout ePub
Note: if you have a 2 page spread in Indesign and you are converting
spread to landscape, you can use the javascript gist here scroller.js
*/
@Pageboy
Pageboy / gallery.css
Created May 27, 2018 13:47
style for gallery
@Pageboy
Pageboy / flickr.js
Last active October 22, 2021 15:09
Flickr Gallery
jsonUrl = "https://api.flickr.com/services/rest/?" +
"method=flickr.photosets.getPhotos&" + ("api_key=" +
options.apiKey + "&") + ("photoset_id=" +
options.photosetId + "&") + ("user_id=" +
options.flickrId + "&") +
"extras=description,url_sq,url_t,url_s,url_m,url_o&" +
"format=json&jsoncallback=?";
@Pageboy
Pageboy / Shell Commands ePub
Created June 18, 2019 14:45 — forked from jamesktan/Shell Commands ePub
Unzipping & Zipping ePub from Command Line
// To unzip the epub, move the ePub to a folder, cd to it then simply:
unzip MyEbook.epub
// To zip up an epub:
1. zip -X MyNewEbook.epub mimetype
2. zip -rg MyNewEbook.epub META-INF -x \*.DS_Store
3. zip -rg MyNewEbook.epub OEBPS -x \*.DS_Store
Some explanations necessary here. We start each line with two flags:
@Pageboy
Pageboy / play.css
Created February 14, 2020 18:11
This CSS is for the play as exported from InDesign
body, div, dl, dt, dd, h1, h2, h3, h4, h5, h6, p, pre, code, blockquote {
}
body {
font-family: georgia, serif;
margin: 40px 0;
padding:0 20px;
background-color: #d1d1d1;
}