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 / README.md
Last active April 20, 2019 19:57
vita

This gist contains dumps of knowledge / facts indexed by vita - a wiki-powered knowledge graph.

@macbre
macbre / .gitignore
Last active March 23, 2019 20:41
scaPy playground
.idea/
env/
*.swp
@macbre
macbre / loko_ciag_stats.py
Created February 22, 2019 08:56
Loko-ciąg
#!/usr/bin/python
def get_iters_count(n):
i = 0
while True:
i += 1
# print(i, n)
if n == 1:
break
@macbre
macbre / .gitignore
Last active December 26, 2018 21:02
Switch from PhantomJS to Chrome's headless mode
node_modules/
*.swp
screenshot.png
@macbre
macbre / first-steps.md
Last active March 3, 2023 12:47
Raspberry PI

First steps

Enable SSH on a headless Raspberry Pi (add file to SD card on another machine)

For headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD card from another computer. When the Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.

Default credentials

@macbre
macbre / macbre_spark_training.ipynb
Last active October 8, 2018 14:21
Spark training
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@macbre
macbre / .gitignore
Last active September 7, 2018 17:12
Farerskie kadry - galeria
env*
foto
_build
#!/bin/bash
WIKI=$1
DB_PARAMS=`dbparams.pl --name $WIKI --type slave`
echo "Removing broken comments redirects on ${WIKI} ..."
mysql $DB_PARAMS -e "select /* SUS-4813 */ page_id from querycache, page where qc_type = 'BrokenRedirects' and qc_title LIKE '%/@comment%' and page_title = qc_title and page_namespace = qc_namespace;" --skip-column-names --batch | tee /tmp/SUS-4813.pages
run_maintenance --db $WIKI --script="deleteBatch.php -u FANDOMbot -r SUS-4813 --by-id --listfile /tmp/SUS-4813.pages"
run_maintenance --db $WIKI --script='updateSpecialPages.php --only=BrokenRedirects'
@macbre
macbre / comscore-migrator.php
Created May 16, 2018 13:11
SUS-4284 | Migrate ComScore tag overrides from tag to WikiFactory variabl
#!/usr/bin/env php
<?php
putenv('SERVER_ID=177');
ini_set('display_errors', '1');
#########################################################################################
require_once('/home/macbre/app/maintenance/commandLine.inc');