Skip to content

Instantly share code, notes, and snippets.

View n0mad01's full-sized avatar
🏡
Working from home

Adrian Soluch n0mad01

🏡
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am n0mad01 on github.
  • I am soluch (https://keybase.io/soluch) on keybase.
  • I have a public key whose fingerprint is 1675 8070 268A AC76 0588 3D17 04C0 DC12 3F6C 3311

To claim this, I am signing this object:

@n0mad01
n0mad01 / README
Last active April 5, 2018 15:19 — forked from varmais/functions.php
Fetch all latest Wordpress posts when using Polylang plugin
[latest_posts]
OR
[latest_posts number_of_posts=3]
OR
[latest_posts number_of_posts=3 language=en]
/**
* Node.js example
* https://github.com/Bittrex/beta
*
* Adrian Soluch
*
* prerequisites:
* npm i signalr-client jsonic
*
* tested with node v9.10.1
@n0mad01
n0mad01 / app.php
Last active November 22, 2016 10:15
Simple Bootstrap Alert Slim/Twig Macro
/**
* Using PHP Slim Frameworks slim/flash
* https://www.slimframework.com/docs/features/flash.html
*
* Assuming this is called from within a Slim route $app->get()
*/
$this->flash->addMessage('success', 'Some success message');
@n0mad01
n0mad01 / gist:04f4048ae2889080b2e01af1cfbf8115
Created July 18, 2016 09:39
You have an array of objects in JavaScript. Each one contains a name (a string) and age (a number). Write a function which returns the objects ordered by age.
var arr = [{name: 'a', age: 234}, {name: 'b', age: 123}, {name: 'c', age: 122}]
arr.sort(function(a, b) {
return a.age - b.age;
});
@n0mad01
n0mad01 / gist:9f6a2aeebfb636566539
Last active November 16, 2015 13:39
bitcoind with Berkeley DB setup on Ubuntu
https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md
cd /home/user/bitcoin
ls -la
drwxrwxr-x 12 user user 4096 Nov 16 14:10 bitcoin
drwxrwxr-x 6 user user 4096 May 10 2015 db4
BITCOIN_ROOT=$(pwd)
BDB_PREFIX="${BITCOIN_ROOT}/db4"
@n0mad01
n0mad01 / cakephp_3_sessions_table_migration.php
Last active October 9, 2015 15:25
CakePHP 3 Sessions Table Migration
this:
-----
CREATE TABLE sessions (
id varchar(40) NOT NULL default '',
data text,
expires INT(11) NOT NULL,
PRIMARY KEY (id)
);
Verifying that +soluch is my Bitcoin username. You can send me #bitcoin here: https://onename.io/soluch