Skip to content

Instantly share code, notes, and snippets.

View pats's full-sized avatar

Patrycjusz Szydło pats

  • Warsaw
View GitHub Profile
@pats
pats / raven-config.js
Created June 13, 2018 13:06
Raven js config
const errorLoggerConfiguration = {
ignoreErrors: [
// Random plugins/extensions
'top.GLOBALS',
// See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error. html
'originalCreateNotification',
'canvas.contentDocument',
'MyApp_RemoveAllHighlights',
'http://tt.epicplay.com',
'Can\'t find variable: ZiteReader',
@pats
pats / raven-config.html
Created June 13, 2018 13:03 — forked from impressiver/raven-config.html
Raven.js configuration for logging JavaScript exceptions to Sentry (https://getsentry.com/). Without the added ignore options, you'll quickly find yourself swamped with unactionable exceptions due to shoddy browser plugins and 3rd party script errors.
<!-- Raven.js Config -->
<script src="{{ JS_PATH }}/lib/raven.js" type="text/javascript"></script>
<script type="text/javascript">
// Ignore list based off: https://gist.github.com/1878283
var ravenOptions = {
// Will cause a deprecation warning, but the demise of `ignoreErrors` is still under discussion.
// See: https://github.com/getsentry/raven-js/issues/73
ignoreErrors: [
// Random plugins/extensions
'top.GLOBALS',

BEM Cheatsheet

BLOCK

Block encapsulates a standalone entity that is meaningful on its own.

While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.

Holistic entities without DOM representation (such as controllers or models) can be blocks as well.

@pats
pats / email_coding_guidelines.md
Created October 11, 2017 11:15 — forked from janogarcia/email_coding_guidelines.md
Email Coding Guidelines
@pats
pats / UF.sql
Created May 30, 2017 08:25 — forked from subterraneanbob/UF.sql
postgresql - traverse graph and perform union find
WITH RECURSIVE
edges (src, dst) AS
(SELECT src, dst FROM comm
UNION
SELECT dst, src FROM comm
ORDER BY src, dst),
transitive_closure(src, dst, distance, path_string) AS
(SELECT src, dst, 1 AS distance, src || '->' || dst || '->' AS path_string
<?php
namespace H57\Util;
class Serializor {
/**
* Converts the Doctrine Entity into a JSON Representation
*
* @param object $object The Object (Typically a Doctrine Entity) to convert to an array
@pats
pats / crawler.py
Created November 20, 2012 20:28 — forked from edcrypt/crawler.py
Simple gevent/httplib2 web crawler.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple async crawler/callback queue based on gevent."""
import traceback
import logging
import httplib2
import gevent
@pats
pats / crawler.py
Created July 29, 2012 14:11 — forked from edcrypt/crawler.py
Simple gevent/httplib2 web crawler.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple async crawler/callback queue based on gevent."""
import traceback
import logging
import httplib2
import gevent
@pats
pats / crawler.py
Created November 17, 2011 20:17 — forked from jmoiron/crawler.py
Simple gevent/httplib2 web crawler.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple async crawler/callback queue based on gevent."""
import traceback
import logging
import httplib2
import gevent