Skip to content

Instantly share code, notes, and snippets.

@BorisAnthony
BorisAnthony / Readmill-1book-reading-data.json
Last active December 19, 2015 17:25
One book example from my Readmill "reading-data.json", to inspect all the things they had built into their service.
{
"book": {
"title": "The Quantum Thief",
"author": "Hannu Rajaniemi",
"cover": "assets/covers/the-quantum-thief.jpg"
},
"user": {
"username": "boris",
"firstname": "Boris",
"lastname": "Anthony",
@BorisAnthony
BorisAnthony / Round_Full_Up_Down.php
Last active January 1, 2016 14:03
PHP Round Full Up and Full Down
<?php
/*
----------------------------------------------------------
FULL ROUND UP and DOWN
Boris Anthony .net - 2016-01-01
Fully agreed with this statement:
"In my opinion PHP's ROUND() function lacks two flags:
- PHP_ROUND_UP - Always round up.
- PHP_ROUND_DOWN - Always round down.
@BorisAnthony
BorisAnthony / DAVID BOWIE’S 2 HOUR 1979 BBC DJ SET
Created January 12, 2016 16:39
DAVID BOWIE’S 2 HOUR 1979 BBC DJ SET
The Doors, “Love Street”
Iggy Pop, “TV Eye”
John Lennon, “Remember”
? & The Mysterians, “96 Tears”
Edward Elgar, “The Nursery Suite” (extract)
Danny Kaye, “Inchworm”
Philip Glass, “Trial Prison”
The Velvet Underground, “Sweet Jane”
Mars, “Helen Fordsdale”
Little Richard, “He’s My Star”
@BorisAnthony
BorisAnthony / how-to-install-php-development-environment-on-osx.md
Last active May 25, 2017 13:59 — forked from jakebellacera/how-to-install-php-development-environment-on-osx.md
How to install a basic Apache, PHP and MySQL development environment with Homebrew. Mirrored from the Echo & Co. blog.

NOTA This is what I'm running, with the difference that I stuck with PHP 5.6.30 because of a dependcy on imagemagick for now. -B. 2017-05-25

How to install a basic Apache, PHP and MySQL development environment with Homebrew

This guide will walk you through the steps required to install a basic Apache, PHP and MySQL development environment using homebrew. Basically, all you'll need to do is copy the commands below into Terminal. Copy one block at a time.

NOTE: this guide is mirrored from Echo & Co.'s blog in case the original blog post or the website decides to go down. I've shared this guide around many times to colleagues and friends. Please give Alan Ivey (@alanthing) all of the credit for publishing this really helpful guide.

Before we begin...

@BorisAnthony
BorisAnthony / Scheduled updates for homebrew - README.md
Last active June 24, 2017 11:35 — forked from denvazh/README.md
Scheduled update for homebrew

Scheduled updates for homebrew

This two launchdaemon scripts provide scheduled updates and upgrade for homebrew packages.

It will run in the following way:

  • brew update every day at 12:10
  • brew upgrade every day at 12:20

How to install

a[data-testid="AppTabBar_Explore_Link"],
a[aria-label="Bookmarks"],
aside[aria-label="Who to follow"],
div[aria-label="Timeline: Trending now"],
#react-root > div > div > div > main > div > div.css-1dbjc4n.r-aqfbo4.r-1niwhzg.r-16y2uox > div > div.css-1dbjc4n.r-aqfbo4.r-1joea0r.r-zso239.r-1ovo9ad > div > div.css-1dbjc4n.r-1xcajam.r-ipm5af.r-1ovo9ad > div > div > div > div > div:nth-child(4){
display:none;
}
div[data-testid="sidebarColumn"] {
visibility: hidden;
}
@BorisAnthony
BorisAnthony / jekyll-plugin-highlight.rb
Created July 27, 2020 12:38
A first attempt at a little Jekyll plugin to parse ==text== into <mark>text</mark>
class HighlightsGenerator < Jekyll::Generator
def generate(site)
all_docs = site.documents
# Converts Markdown-plus ==text== to <mark>text</mark>
all_docs.each do |current_note|
current_note.content = current_note.content.gsub(
/\=\=(.*)\=\=/i,
'<mark>\1</mark>'
@BorisAnthony
BorisAnthony / jekyll-plugin-highlight.2.rb
Created July 28, 2020 07:35
A second attempt at a little Jekyll plugin to parse ==text== into <mark>text</mark>
Jekyll::Hooks.register :pages, :pre_render do |page|
page.content = page.content.gsub(
/\=\=(.*)\=\=/i,
'<mark>\1</mark>'
)
end
Jekyll::Hooks.register :documents, :pre_render do |doc|
# We want to catch all pages, posts, docs in collections
doc.content = doc.content.gsub(
/\=\=(.*)\=\=/i,
'<mark markdown="span">\1</mark>'
)
# setting the markdown="span" flag tells Kramdown to parse what's between the tags,
# otherwise it is ignored.
end
@BorisAnthony
BorisAnthony / dm-toilet-paper.js
Created October 28, 2020 11:55 — forked from marco79cgn/dm-toilet-paper.js
iOS Widget, das die Anzahl an Klopapier Packungen in deiner nächsten dm Drogerie anzeigt (für die scriptable.app)
// dm Klopapier Widget
//
// Copyright (C) 2020 by marco79 <marco79cgn@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE