Skip to content

Instantly share code, notes, and snippets.

View LeZuse's full-sized avatar
🚀
Scaling productboard.com

Tomas Ruzicka LeZuse

🚀
Scaling productboard.com
View GitHub Profile
@LeZuse
LeZuse / ejabberd_
Created May 22, 2011 02:21
Munin plugin script for ejabberd2
#!/bin/bash
#
# Munin plugin for ejabberd2.
# This script supports versions 2.0 and 2.1 of ejabberd.
#
# Written by Lasse Karstensen <[email protected]> 2007-05-27.
# Based on ejabberd-plugin by Christian Dröge <[email protected]>
#
# Status, memory, threads, ejabberd2 and other code optimalisation
# by Peter Viskup <[email protected]>
@LeZuse
LeZuse / art.py
Created December 1, 2011 04:25
Android resource tracker
#!/usr/bin/env python
'''
Feel free to modify and/or enhance this tool. Also feel free to fix bugs you found.
I would be happy if you could share your modified version on the blog, where this tool
was posted.
Blog-URL: http://www.droidnova.com/android-resource-tracker,723.html
Project Page: http://code.google.com/p/androidresourcetracker
This tool is from a developer for developers, so be like a good colleague and share your
@LeZuse
LeZuse / transform_offset.html
Created March 12, 2012 00:27
CSS Transform offset chain modification
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
@LeZuse
LeZuse / fingerprint.txt
Last active July 10, 2016 19:33
My SSH Public key
2048 80:c5:d8:14:ca:85:83:77:fb:0b:71:87:b8:71:ce:ea Zuse@WINIE7 (RSA)
@LeZuse
LeZuse / hack.sh
Created March 31, 2012 15:13 — forked from erikh/hack.sh
Useful OSX settings for hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@LeZuse
LeZuse / Javascript-base.sublime-snippet
Last active March 20, 2023 16:52
Sublime Text Javascript snippets
<snippet>
<content><![CDATA[base(this, '${1:method}'${2});${0}]]></content>
<tabTrigger>base</tabTrigger>
<scope>source.js</scope>
<description>Base method call</description>
</snippet>
@LeZuse
LeZuse / bash.log
Created April 17, 2012 21:14
Fixing bundle install/update of do_mysql on Mac OS X
FXS-iMac-3:newsletter tomas$ sudo bundle update
Fetching gem metadata from http://rubygems.org/.........
.....
Installing do_mysql (0.10.8) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
@LeZuse
LeZuse / detect.py
Created May 2, 2012 18:28
Flask browser detection
browser = request.user_agent.browser
version = request.user_agent.version and int(request.user_agent.version.split('.')[0])
platform = request.user_agent.platform
uas = request.user_agent.string
if browser and version:
if (browser == 'msie' and version < 9) \
or (browser == 'firefox' and version < 4) \
or (platform == 'android' and browser == 'safari' and version < 534) \
or (platform == 'iphone' and browser == 'safari' and version < 7000) \
@LeZuse
LeZuse / macro.conf
Created May 4, 2012 22:19
Apache mod_macro example
# Place in mods-enabled folder (or symlink here)
<Macro VHostSetup $name>
ServerName $name
ServerAlias www.$name
ServerAdmin administrator@$name
DocumentRoot /var/www/apache/$name/$name
<Directory /var/www/apache/$name/$name>
Order allow,deny
Allow from all
@LeZuse
LeZuse / function.js
Created May 7, 2012 23:30
JS Function.prototype.compose
Function.prototype.compose = function(argFunction) {
var invokingFunction = this;
return function() {
return invokingFunction.call(this, argFunction.apply(this,arguments));
}
}