Skip to content

Instantly share code, notes, and snippets.

View pjendrusik's full-sized avatar
🐿️

Paweł Jendrusik pjendrusik

🐿️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am pjendrusik on github.
  • I am pjendrusik (https://keybase.io/pjendrusik) on keybase.
  • I have a public key ASBWIf8VZvVTr8nuN1Mqe4_MNSfIkfrZ60Wy038KB1FHZAo

To claim this, I am signing this object:

@pjendrusik
pjendrusik / improved-lnd-bitcoind-mainnet.md
Created February 14, 2019 23:21 — forked from bretton/improved-lnd-bitcoind-mainnet.md
Detailed guide to installing LND and Bitcoind on Ubuntu 16.04 LTS for Mainnet

Intro

This guide is specific to getting LND 0.5-beta and Bitcoind running on Ubuntu 16.04 LTS for mainnet.

Original installation guide:

This guide is broken into the following sections:

  • Install bitcoind and set to start automatically
  • Install development tools and dependancies
### Keybase proof
I hereby claim:
* I am pjendursik on github.
* I am pjendrusik (https://keybase.io/pjendrusik) on keybase.
* I have a public key ASBWIf8VZvVTr8nuN1Mqe4_MNSfIkfrZ60Wy038KB1FHZAo
To claim this, I am signing this object:
@pjendrusik
pjendrusik / gist:0034e7edcddab477568c281aae5b5354
Created September 7, 2017 10:59 — forked from timonweb/gist:3165322
Code to catch all PHP errors which result in 500 Error Code. Include this snippet at the beginning of index.php file
<?php
define('E_FATAL', E_ERROR | E_USER_ERROR | E_PARSE | E_CORE_ERROR |
E_COMPILE_ERROR | E_RECOVERABLE_ERROR);
define('ENV', 'dev');
//Custom error handling vars
define('DISPLAY_ERRORS', TRUE);
define('ERROR_REPORTING', E_ALL | E_STRICT);
@pjendrusik
pjendrusik / IP-Guide.md
Created November 8, 2016 12:44 — forked from Golpha/IP-Guide.md
The PHP IP Guide

The PHP IP Guide

This guide shows you common practices to convert IPv4- and IPv6-Addresses into their binary representation.

Who is responsible for this ?

This guide has been written by Matthias Kaschubowski, a autodidactical software developer from germany with about 14 years of practice converting coffee to code. He works in his free time as a php evangelist on a lot of platforms ( last shown as tr0y on php.de, a german PHP related forum and as himself as an adminstrator at the largest PHP-related facebook group ).

Basics

If the input is utf8-encoded, might use unicode regex to match/strip invisible control characters like e2808e (left-to-right-mark). Use u (PCRE_UTF8) modifier and \p{C} or \p{Other}.
Strip out all invisibles:
$str = preg_replace('/\p{C}+/u', "", $str);
@pjendrusik
pjendrusik / TestFrameworkInATweet.php
Created June 15, 2016 08:52 — forked from mathiasverraes/TestFrameworkInATweet.php
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
@pjendrusik
pjendrusik / System Design.md
Created April 18, 2016 16:53 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?