Skip to content

Instantly share code, notes, and snippets.

View dz0ny's full-sized avatar
💭
❤️✖️❓🤖

Janez Troha dz0ny

💭
❤️✖️❓🤖
View GitHub Profile
@dz0ny
dz0ny / printer-prusa-mk3s-2021-bondtech.cfg
Last active March 3, 2023 09:08 — forked from nikolak/printer-prusa-mk3s-2021.cfg
Klipper MK3S/+ Config including optional Bondtech Extruder, Bear Extruder, etc.
# This file contains pin mappings and reasonable defaults for Prusa i3 MK3S
# printers. It will work with MK3 (non-S) by selecting the alternative filament
# sensor. References to common community mods are included as well.
#
[include mainsail.cfg]
[skew_correction]
[force_move]
@dz0ny
dz0ny / buildHAProxy.sh
Last active October 25, 2019 05:23 — forked from codingtony/buildHAProxy.sh
Recipe to build HAProxy 1.8 using LibreSSL. Builds an almost static binary. See https://github.com/codingtony/docker-build-haproxy for how to use with a Docker Image
#!/bin/bash -e
DIR=$PWD/work
mkdir -p ${DIR}
rm -f ${DIR}/*.tar.gz
LIBRESSL=libressl-2.4.5
HAPROXY=haproxy-1.8.4
PCRE=pcre-8.39
@dz0ny
dz0ny / wp-mem-usage.php
Created September 27, 2017 15:54 — forked from BigWhale/wp-mem-usage.php
WordPress theme memory usage
add_action( 'shutdown', 'do_shutdown', 999);
function do_shutdown() {
$f = fopen('/tmp/memory_usage.txt', 'a+');
$usage = memory_get_peak_usage( true );
fwrite( $f, $usage / 1024 / 1024 . " MB\n" );
fclose( $f );
}
---
- hosts: all
gather_facts: false
name: CVE-2014-6271 bash vulnerability fix
tasks:
- name: check bash fix
command: env ls='() { echo vulnerable; }' bash -c ls
register: command_result
changed_when: False
1. Download https://github.com/dz0ny/leapcast/archive/master.zip
2. Extract zip to C:\leapcast
3.1 Download Python 2.7:
x86: http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi
x64: http://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi
3.2 Install Python to C:\Python27
NOTE: If you have a newer version, install 2.7.5 and edit the environment variable and change for example "C:\Python33" to "C:\Python27".
4.1 Download Setuptools here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools

Choose a directory to download both brackets-shell and brackets git respositories. The following script will setup the repositories and download required dependencies.

wget https://gist.github.com/jasonsanjose/5514813/raw/e2e688f0e5151b93a2f2c17c93436bac13d32f35/setup.sh; chmod +x setup.sh; bash setup.sh; rm setup.sh
@dz0ny
dz0ny / build
Created July 2, 2013 10:58 — forked from elimisteve/build
#!/bin/bash
# This is a simple build script and will be executed on your CI system if
# available. Otherwise it will execute while your application is stopped
# before the deploy step. This script gets executed directly, so it
# could be python, php, ruby, etc.
tarball="https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz"
# Set GOROOT since we don't use GOROOT_FINAL
mkdir -p $OPENSHIFT_HOMEDIR/app-root/data/go
@dz0ny
dz0ny / index.html
Last active December 13, 2015 19:09 — forked from darwin/index.html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">#ubuntu-si</tspan>
</label>
<actor t="translate(146,34)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59">
@dz0ny
dz0ny / nginx_wordpress.conf
Created September 30, 2012 10:24 — forked from camsong/nginx_wordpress.conf
Sample of nginx config for php wordpress sites
server {
listen 80;
root /opt/WordPress/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
# Cache static files for as long as possible
location ~* \.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>