Skip to content

Instantly share code, notes, and snippets.

View macbre's full-sized avatar
🏠
Working from home

Maciej Brencz macbre

🏠
Working from home
View GitHub Profile
@macbre
macbre / docker_clean.sh
Created December 18, 2016 13:41
Docker utils
IMAGES=`docker ps -a | grep -E 'Exited|Created' | awk '{print $1}'`
df -h | head -n2
for IMAGE in $IMAGES
do
docker rm $IMAGE
done
df -h | head -n2
@macbre
macbre / age.sh
Created December 8, 2016 13:23
git path age
#!/bin/bash
EXTENSIONS="extensions/wikia/AchievementsII
extensions/wikia/Answers
extensions/wikia/ArticleComments
extensions/wikia/Blogs
extensions/wikia/Chat2
extensions/wikia/CreateNewWiki
extensions/wikia/Forum
extensions/wikia/HAWelcome
extensions/wikia/ImageReview
@macbre
macbre / crowdin-fandom.php
Last active October 28, 2016 14:46
SUS-1121
#!/usr/bin/env php
<?php
$msgFile = '/extensions/wikia/Oasis/Oasis.i18n.php';
function write_i18n_file($file, Array $messages) {
global $IP;
$extension = str_replace($IP, '', $file);
$extension = str_replace('.i18n.php', '', $extension);
@macbre
macbre / specs.md
Created September 22, 2016 16:17
Q6600
$ sudo dmidecode -t 4 
# dmidecode 2.12
SMBIOS 2.4 present.

Handle 0x0004, DMI type 4, 35 bytes
Processor Information
	Socket Designation: Socket 775
	Type: Central Processor
	Family: Pentium 4
# php7-fpm - The PHP FastCGI Process Manager
# Original script by Ondřej Surý. Adapted to php7-fpm by @bjornjohansen
description "The PHP FastCGI Process Manager"
author "Ondřej Surý <[email protected]>"
start on runlevel [2345]
stop on runlevel [016]
# Precise upstart does not support reload signal, and thus rejects the
@macbre
macbre / _service.md
Created August 5, 2016 17:13 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)

Remove not used containers

$ docker rm $( docker ps --all -f status=exited -q )
@macbre
macbre / README.md
Last active July 12, 2016 08:53
SMW migration

SMW migrator

  • Get the list of wikis with SMW enabled ($wgEnableSemanticMediaWikiExt = true) and that are not yet migrated to the new storage / DB schema (smwgDefaultStore not set in WikiFactory)
  • Run migrator.sh followed by switchStorage.sh for each of these wikis (provide city ID as an argument). The first one performs the schema migration (no changes are visible to the users at that moment), the latter one will switch WF variable to let SMW use new and more performant DB schema,
  • You're done :)

Cleanup

Once the migration is completed and the new storage is running fine the old schema can be removed by running the following:

@macbre
macbre / by_reviewer.csv
Last active May 31, 2016 19:40
Statystyki review/approve dla pl.wikipedia.org za rok 2016
reviews author
6184 PMG
4393 PG
3064 Stok
3035 Elfhelm
2916 Andrzei111
2790 PawełMM
2238 Czytelnik Janek
2194 RoodyAlien
1933 Andrzej94
@macbre
macbre / TODO.md
Last active August 19, 2017 20:08
Puls Poznania

Poznań mniej znany

W cyklu artykułów "Poznań mniej znany" chciałbym przedstawić swoje rodzine miasto z nieco mniej znanej strony. Opisać historie i miejsca, które często mijamy w drodze do pracy, na uczelnię, na spacerze, ale nie zwracamy na nie uwagi.

Forteczne pozostałości na Cybinie

Opis pochodzących z czasów pruskich jazów i schronów przy Cybinie w okolicach Jeziora Maltańskiego.

Arsenał przed wiekami