Skip to content

Instantly share code, notes, and snippets.

Artur Bodera Thinkscape

Block or report user

Report or block Thinkscape

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Thinkscape
Thinkscape / dom-parser.ts
Created May 16, 2017
PM DOMParser allowing invokables for parseDOM
View dom-parser.ts
import * as dom from '../prosemirror/dom';
import {
DOMParser as PMDOMParser,
ParseContext as PMParseContext,
NodeType,
ParseRule,
Node,
Mark
} from '../prosemirror';
View -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 52.9.79.155...
* Connected to sameroom.io (52.9.79.155) port 443 (#0)
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: www.sameroom.io
* Server certificate: StartCom Class 2 Primary Intermediate Server CA
* Server certificate: StartCom Certification Authority
> GET /maps/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTYzOTQ0MDAsImJyaWRnZV9pZCI6MjYwODl9.QX8reWSuV6l9r3-Ze6LrZ0CkUwjaGEtwng7HB_lU_NE HTTP/1.1
> Host: sameroom.io
View duplicity-resume-full-enc-backup.patch
--- duplicity 2015-08-19 12:00:48.000000000 +0200
+++ duplicity 2015-08-19 12:00:43.000000000 +0200
@@ -158,7 +158,8 @@
# there is no sign_key and there are recipients
elif (action == "full"
and (globals.gpg_profile.recipients or globals.gpg_profile.hidden_recipients)
- and not globals.gpg_profile.sign_key):
+ and not globals.gpg_profile.sign_key
+ and not globals.restart):
return ""
@Thinkscape
Thinkscape / EffectiveUrlMiddleware.php
Last active Jul 3, 2019
getEffectiveUrl() replacement for Guzzle 6.*
View EffectiveUrlMiddleware.php
<?php
namespace Thinkscape\Guzzle;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
class EffectiveUrlMiddleware
{
/**
* @var Callable
@Thinkscape
Thinkscape / gist:a9f96d9ecffeb6ba9f4f
Last active Aug 29, 2015
Mixcloud onboarding genres 08.2015
View gist:a9f96d9ecffeb6ba9f4f
@Thinkscape
Thinkscape / gist:da8bf3c2f33b23af68c3
Created Aug 10, 2015
List of last.fm top-level genres (tags) 08.2015
View gist:da8bf3c2f33b23af68c3
60s
70s
80s
90s
acoustic
ambient
blues
classical
country
electronic
@Thinkscape
Thinkscape / gist:8b98b82a74c102b31f5d
Created Aug 10, 2015
List of soundcloud.com music genres 08.2015
View gist:8b98b82a74c102b31f5d
Alternative Rock
Ambient
Audiobooks
Business
Classical
Comedy
Country
Dance & EDM
Dancehall
Deep House
@Thinkscape
Thinkscape / mtr.txt
Created Jul 2, 2015
mtr -c 30 --report 5.135.99.110
View mtr.txt
Start: Thu Jul 2 11:25:00 2015
HOST: Sombrero-3.local Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.100.84.1 0.0% 30 1.2 3.3 1.1 23.9 5.1
2.|-- 84.207.252.3.not-updated. 0.0% 30 1.1 1.1 0.9 2.6 0.3
3.|-- 217.112.154.169.not-updat 0.0% 30 7.2 9.4 7.0 47.8 7.5
4.|-- ??? 100.0 30 0.0 0.0 0.0 0.0 0.0
5.|-- rbx-g2-a9.fr.eu 0.0% 30 16.7 17.1 16.2 18.3 0.3
6.|-- rbx-s5-6k.fr.eu 0.0% 30 51.9 19.3 15.7 55.5 9.5
7.|-- 5.135.99.110 0.0% 30 16.1 17.4 16.0 29.4 3.2
@Thinkscape
Thinkscape / gist:4a414653a7945d315f36
Created Mar 10, 2015
DoctrineORMModule issue #383
View gist:4a414653a7945d315f36
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1130] Host 'REDACTED' is not allowed to connect to this MySQL server' in /Users/Thinkscape/Documents/Projects/REDACTED/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 909
PDOException: SQLSTATE[HY000] [1130] Host 'REDACTED' is not allowed to connect to this MySQL server in /Users/Thinkscape/Documents/Projects/REDACTED/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 43
Call Stack:
0.0002 227872 1. {main}() /Users/Thinkscape/Documents/Projects/REDACTED/shell:0
0.0004 231880 2. include('/Users/Thinkscape/Documents/Projects/REDACTED/public/index.php') /Users/Thinkscape/Documents/Projects/REDACTED/shell:4
0.0037 525376 3. Zend\Mvc\Application::init() /Users/Thinkscape/Documents/Projects/REDACTED/public/index.php:10
0.0605 4600776 4. Zend\Mvc\Application->bootstrap() /Users/Thinkscape/Documents/Projects/REDACTED/vendor/zendframework/
@Thinkscape
Thinkscape / flattenExceptionBacktrace.php
Last active May 10, 2019
Make any PHP Exception serializable by flattening complex values in backtrace.
View flattenExceptionBacktrace.php
<?php
function flattenExceptionBacktrace(\Exception $exception) {
$traceProperty = (new \ReflectionClass('Exception'))->getProperty('trace');
$traceProperty->setAccessible(true);
$flatten = function(&$value, $key) {
if ($value instanceof \Closure) {
$closureReflection = new \ReflectionFunction($value);
$value = sprintf(
'(Closure at %s:%s)',
You can’t perform that action at this time.