Skip to content

Instantly share code, notes, and snippets.

View BorisAnthony's full-sized avatar

Boris Anthony BorisAnthony

View GitHub Profile
@BorisAnthony
BorisAnthony / twitter-user-stylesheet.css
Created January 16, 2012 19:27 — forked from micrypt/twitter-user-stylesheet.css
CSS rules to hide "Discover", "Trending Topics" and "Who To Follow" on new new Twitter.
[data-component-term="trends"] *,
[data-component-term="user_recommendations"] *,
[data-global-action="discover"] *,
*[class*=promoted] {
display: none !important;
}
/*
Stop everything bouncing upon seeing modal windows under Lion when using a trackpad (non-persistent scrollbars)
Originally from https://gist.github.com/1502938
@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