Skip to content

Instantly share code, notes, and snippets.

View BenjaminNolan's full-sized avatar

Benjamin Nolan BenjaminNolan

  • Barcelona, Spain
View GitHub Profile
@BenjaminNolan
BenjaminNolan / console.js
Created August 20, 2024 17:31
Delete 100 items at a time from your YouTube Watch Later playlist
// Open https://www.youtube.com/playlist?list=WL, open the JS console, and paste this in.
//
// It'll remove 100 items and then stop, giving the API some time to calm down.
//
// If it hits a deleted video, you'll get an error, just manually remove it and go again.
let t = setInterval(() => {
document.querySelector('#contents button#button').click();
setTimeout(() => {
document.querySelector('#contentWrapper #items[role=listbox] [role=menuitem]:nth-child(3)').click();
Sauce: George Bevan, https://www.facebook.com/georgeyb91?fref=nf
URL: https://www.facebook.com/georgeyb91/posts/10156954125750504
Alright, you filthy animals. I don't normally do this, because I believe that everyone should have the right to vote how they
want at elections, but a) this ain't an election, it's a referendum so go shit yourself, and b) I honestly believe that the
stakes are too high for me not to get involved here. If I can influence even one person with this post, then I'll feel like
I've done something important. As a result, feel free to share this far and wide as I've done a veritable fuckload of
research and I don't want all my hard work going to waste.
So, I'll put my cards on the table: I believe, very very strongly, that we need to stay in the EU. I never thought I'd find
@BenjaminNolan
BenjaminNolan / README.md
Created February 4, 2016 21:10 — forked from EugeneKay/README.md
Winode Instructions
bool disposed = false;
public bool Disposed
{
get
{
return disposed;
}
}
bool disposed = false;
$ apt-get update
Hit http://mirrors.linode.com wheezy Release.gpg
Hit http://mirrors.linode.com wheezy/updates Release.gpg
Hit http://mirrors.linode.com wheezy-updates Release.gpg
Hit http://mirrors.linode.com wheezy Release
Hit http://mirrors.linode.com wheezy/updates Release
Hit http://mirrors.linode.com wheezy-updates Release
Hit http://packages.dotdeb.org wheezy Release.gpg
Hit http://mirrors.linode.com wheezy/main Sources
Hit http://packages.dotdeb.org wheezy-php55 Release.gpg
@BenjaminNolan
BenjaminNolan / composer.json
Last active August 29, 2015 14:06
This generates a weird error in doctrine/dbal 2.5 when it's used from doctrine/orm 2.4
{
"name": "ohlook/its-a-bee",
"description": "Super Secret Project",
"license": "All Rights Reserved",
"keywords": [
"bp",
"fll",
"api"
],
"homepage": "http://www.wearetilt.com/",
@BenjaminNolan
BenjaminNolan / bug.php
Last active August 29, 2015 14:05
HHVM xml canonicalization bug
<?php
$xml = '<?xml version="1.0"?>' . "\n"
. '<samlp:Response xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xm'
. 'lns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Destination="https://pro'
. 'ject.mysite.com/saml/acs" ID="FIMRSP_5990c800-0147-1411-b087-93da9d684e69" IssueInstant="2014-07-21T15:36:06Z" Ver'
. 'sion="2.0"><saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">https://accessuat.mysite.com/fim/sps'
. '/saml20/saml20</saml:Issuer><samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:'
. 'Status><saml:Assertion ID="Assertion-uuid5990c7c6-0147-19bd-9537-93da9d684e69" IssueInstant="2014-07-21T15:36:06Z" Versi'
. 'on="2.0"><saml:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">https://accessuat.mysite.com/fim/sps/s'
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="Bootstrap.php" colors="true">
<testsuites>
<testsuite name="tilt-api">
<directory>./TiltTest</directory>
<exclude>./TiltTest/Controller/Base/</exclude>
</testsuite>
</testsuites>
</phpunit>
@BenjaminNolan
BenjaminNolan / gist:1cc950a1db13f30c3076
Last active August 29, 2015 14:03
My five-course meal wot I planned. :D

L'aperitifs

Crevettes sautées avec accompagnements
Grilled prawns with accompaniments
Hors d'œuvres
You know the drill :)
function loadgist(gist,name)
content = http_get_gist(gist,name)
if content then
func, err = loadstring(content)
if not err then
return func
else
print("Error: "..err)
end
end