Skip to content

Instantly share code, notes, and snippets.

View matrixik's full-sized avatar

Dobrosław Żybort matrixik

View GitHub Profile
@matrixik
matrixik / xauth_request.py
Created September 14, 2012 16:08 — forked from codingjester/xauth_request.py
Python xAuth Example
#!/usr/bin/env python
import urllib
import urlparse
import oauth2 as oauth
import json
consumer_key="consumer_key"
consumer_secret="consumer_secret"
access_token_url = 'http://www.tumblr.com/oauth/access_token'
@matrixik
matrixik / gist:8b66bc6573f2ffc1591618a79566e4ad
Last active October 18, 2016 08:56
Add SELinux rule for /var/run/mariadb
yum install -y policycoreutils-python
semanage fcontext -a -t mysqld_db_t "/var/run/mariadb(/.*)?" && restorecon -Rv "/var/run/mariadb"
@matrixik
matrixik / gist:896d5b5a6064b155b0b2a62f8586c801
Last active October 18, 2016 11:37
Systemd fix for MariaDB 5.5 with /var/run/mariadb permission denied errors
# Add to {mysqld,mariadb}.service file
ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mariadb
# OR
RuntimeDirectory=mariadb
RuntimeDirectoryMode=755
@matrixik
matrixik / REDME.md
Last active February 5, 2017 15:48
Soup zsh theme

Add to ~/.zshrc

zplug "matrixik/d28c717108b0c1bfad233588da5cac31", \
  from:gist, \
  as:theme

Fix for prezto

# Fix for Soup theme
@matrixik
matrixik / README.md
Last active March 14, 2017 09:05
Simple tornado test server

Start with:

python app.py some_info
curl 127.0.0.1:8888
curl 127.0.0.1:8888/get
curl --data 'supa=extra' 127.0.0.1:8888/post
@matrixik
matrixik / chef-stacktrace.out
Last active May 16, 2017 05:37
Suse Cloud 7 log
Generated at 2017-05-15 09:42:51 +0000
Mixlib::ShellOut::ShellCommandFailed: service[horizon] (horizon::server line 35) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of sleep 1 && pkill --signal SIGUSR1 -f "^\(wsgi:horizon\)" && sleep 1 ----
STDOUT:
STDERR:
---- End output of sleep 1 && pkill --signal SIGUSR1 -f "^\(wsgi:horizon\)" && sleep 1 ----
Ran sleep 1 && pkill --signal SIGUSR1 -f "^\(wsgi:horizon\)" && sleep 1 returned 1
/usr/lib64/ruby/gems/2.1.0/gems/mixlib-shellout-1.3.0/lib/mixlib/shellout.rb:253:in `invalid!'
/usr/lib64/ruby/gems/2.1.0/gems/mixlib-shellout-1.3.0/lib/mixlib/shellout.rb:239:in `error!'
/usr/lib64/ruby/gems/2.1.0/gems/chef-10.32.2/lib/chef/mixin/shell_out.rb:36:in `shell_out!'
@matrixik
matrixik / monasca-in-docker.md
Last active September 12, 2018 09:55
Monasca in Docker

What went good

  • Ability to build from master and Gerrit (also common).
  • Finding more problems with Python 3 compatibility.
  • Every container provide information from what versions it was built.
  • Monasca-common Zuul jobs push base image to Docker Hub (as monasca/base). https://hub.docker.com/r/monasca/base/tags/
  • Standardized wait scripts.

What went bad (or mistakes)

  • Always requesting git repository.
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@matrixik
matrixik / copy_to_pictures.desktop
Last active March 4, 2020 23:31
Geeqie copy file to ~/Pictures with changing name when clicking F12
[Desktop Entry]
Version=1.0
Type=Application
# The name which appears in the menu:
Name=Copy to Pictures
# Replace "command" with the actual command or script:
#Exec=yes | cp -rf %F ~/Pictures
Exec=geeqie_copy.sh %F &
@matrixik
matrixik / README.md
Last active August 9, 2023 13:59
Add specific folders and subfolders to Windows local profile `PATH` environment variable

Add specific folders and subfolders to Windows local profile PATH environment variable with exclusions.

  1. Save add-paths-to-env.ps1 to folder of with subfolders you want add to PATH.
  2. Edit lines 6, 7 and 12.
  3. Run: .\add-paths-to-env.ps1
  4. Restart.