Skip to content

Instantly share code, notes, and snippets.

View lukin0110's full-sized avatar
💭
Busy setting my status

Maarten Huijsmans lukin0110

💭
Busy setting my status
View GitHub Profile
@lukin0110
lukin0110 / delete-svn.sh
Created October 12, 2012 21:18
Recursively delete .svn directories
#!/bin/sh
echo "recursively removing .svn folders from"
pwd
rm -rf `find . -type d -name .svn`
@lukin0110
lukin0110 / gist:4060787
Created November 12, 2012 17:44
Get database size in MB
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
FROM information_schema.TABLES GROUP BY table_schema ;
@lukin0110
lukin0110 / gist:4065898
Created November 13, 2012 14:01
Comment window in pure css
<html>
<head>
<style>
body{padding:100px;}
.arrow{
width:0px;
border-top:0px solid red;
border-left:50px solid transparent;
border-right:50px solid transparent;
border-bottom:50px solid purple;
@lukin0110
lukin0110 / gist:4065905
Created November 13, 2012 14:03
Python kivy test
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text='Hello World dd')
TestApp().run()
#http://kivy.org/#home
@lukin0110
lukin0110 / gist:4066000
Created November 13, 2012 14:24
Rename a schema in MySql
mysqladmin create new_db_name
mysqldump db_name | mysql new_db_name
@lukin0110
lukin0110 / gist:4066223
Created November 13, 2012 15:10
MySql schema size
SELECT table_schema,
SUM(data_length+index_length)/1024/1024 AS total_mb
FROM information_schema.tables
GROUP BY table_schema
ORDER BY 2 DESC;
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
function parse_git_branch_and_add_brackets {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \[\1\]/'
}
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
@lukin0110
lukin0110 / gist:4586392
Created January 21, 2013 14:20
install oracle jdk7 on ubuntu
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-jdk7-installer
http://lh.2xlibre.net/locale/fr_BE/
http://framework.zend.com/manual/1.12/en/zend.locale.appendix.html
http://www.localeplanet.com/icu/fr-BE/index.html
"fields": {
"rule_few": "",
"code_aliases": " fr-BE fr-be fr_be ",
"code": "fr_BE",
"name": "French (Belgium)",
"description": "",
@lukin0110
lukin0110 / nicelog
Created February 8, 2013 08:45
git nicelog, add this snippet to your .gitconfig file
nicelog = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --