Skip to content

Instantly share code, notes, and snippets.

View Srokap's full-sized avatar

Paweł Sroka Srokap

View GitHub Profile
1: 日
2: 一
3: 国
4: 会
5: 人
6: 年
7: 大
8: 十
9: 二
10: 本
@Srokap
Srokap / Docker connect to remote server.md
Created March 6, 2021 15:14 — forked from kekru/Docker connect to remote server.md
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@Srokap
Srokap / crs10.csv
Last active February 19, 2017 18:30
Converted https://github.com/rikkertkoppes/spacex-telemetry/blob/master/crs10.txt to CSV. Removed leading and trailing junk, but still some rows are corrupted. Most of them are fine.
We can't make this file beautiful and searchable because it's too large.
Time,Speed,Altitude
00:00:05,00000,00.0
00:00:05,00000,00.0
00:00:05,00000,00.0
00:00:05,00000,00.0
00:00:05,00000,00.0
00:00:05,00000,00.0
00:00:05,00000,00.0
00:00:05,00000,00.0
00:00:05,00000,00.0
@Srokap
Srokap / composer.json
Created January 29, 2014 12:28
composer.json for Elgg projest
{
"name": "srokap/elgg",
"type": "project",
"description": "Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.",
"homepage": "http://elgg.org/",
"minimum-stability": "stable",
"keywords": ["elgg", "framework", "social network", "open source social networking", "social intranet", "collaboration software", "social networking software", "community software", "social media", "social publishing", "social media platform"],
"license": ["GPL-2.0", "MIT"],
"authors": [
{
@Srokap
Srokap / composer.json
Created December 25, 2013 10:46
Sample composer.json for Elgg core with additional requirement of srokap/code_review
{
"name": "elgg/elgg",
"type": "project",
"description": "Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.",
"homepage": "http://elgg.org/",
"minimum-stability": "stable",
"keywords": ["elgg", "framework", "social network", "open source social networking", "social intranet", "collaboration software", "social networking software", "community software", "social media", "social publishing", "social media platform"],
"license": ["GPL-2.0", "MIT"],
"authors": [
{
@Srokap
Srokap / config
Created August 20, 2013 12:31
Transifex .tx/config file for Elgg
[main]
host = https://www.transifex.com
[elgg-core.engine]
file_filter = languages/<lang>.php
source_file = languages/en.php
source_lang = en
type = PHP_ARRAY
[elgg-core.install]
@Srokap
Srokap / gist:5655131
Created May 27, 2013 04:00
Dump of entity additional data. Refs https://github.com/Elgg/Elgg/pull/5539
Elgg Core Unit Tests
string 'ElggObject' (length=10)
array
'maxtime' => string '1369627086' (length=10)
Exception: G:/GIT/Srokap/Elgg1.9/engine/tests/ElggCoreEntityGetterFunctionsTest.php -> ElggCoreEntityGetterFunctionsTest -> testElggApiGettersEntitiesFromAnnotation -> Unexpected PHP error [Invalid error type specified] severity [2] in [G:\GIT\Srokap\Elgg1.9\engine\classes\Elgg\AttributeLoader.php line 260]
string 'ElggObject' (length=10)
@Srokap
Srokap / test.php
Created May 9, 2013 19:29
Timestamp in int or string memory consumption
$mx = 10000;
$mem = memory_get_usage();
$data1 = array();
$i = $mx;
while ($i-- >0) {
$data1[] = 1368118712;
}
$i1 = (memory_get_usage() - $mem);
echo ' ';
Exception #1364526180: exception 'DatabaseException' with message 'Elgg couldn't select the database '', please check that the database is created and you have access to it.' in /home/travis/build/Srokap/Elgg/engine/classes/ElggDatabase.php:120
Stack trace:
#0 /home/travis/build/Srokap/Elgg/engine/classes/ElggDatabase.php(72): ElggDatabase->establishLink('readwrite')
#1 /home/travis/build/Srokap/Elgg/engine/classes/ElggDatabase.php(51): ElggDatabase->setupConnections()
#2 /home/travis/build/Srokap/Elgg/engine/lib/database.php(118): ElggDatabase->getLink('read')
@Srokap
Srokap / amd_bug
Created March 24, 2013 13:42
Problem with AMD in Elgg 1.9 and 1.8 standard of JS assets loading.
Error: Mismatched anonymous define() module: function (punycode, IPv6, SLD) {
"use strict";
function URI(url, base) {
// Allow instantiation without the 'new' keyword
if (!(this instanceof URI)) {
return new URI(url, base);
}
if (url === undefined) {