Skip to content

Instantly share code, notes, and snippets.

View neko-fire's full-sized avatar
💭
Save the princess

Martin neko-fire

💭
Save the princess
  • Germany / Philippines
View GitHub Profile
@neko-fire
neko-fire / Mysql user reset
Created March 5, 2014 10:18
Reset mysql user password, needs to be run in save mode.
INSERT INTO mysql.user
SET user = 'root',
host = 'localhost',
password = Password('wwPmz59DyjPYqa'),
super_priv = 'y',
select_priv = 'y',
insert_priv = 'y',
update_priv = 'y',
delete_priv = 'y',
create_priv = 'y',
PS1="\[\e[00;34m\]\t\[\e[0m\]\[\e[00;37m\] \u@\h:[\[\e[0m\]\[\e[00;32m\]\w\[\e[0m\]\[\e[00;37m\]]\[\e[0m\]\[\e[00;36m\]\$\[\e[0m\]\[\e[00;37m\] \[\e[0m\]"
@neko-fire
neko-fire / remove _MACOSX
Created November 19, 2013 10:40
Remove _MACOSX folder from Archive
zip -d Archive.zip __MACOSX/\*
@neko-fire
neko-fire / find file with specific size
Created October 30, 2013 13:57
Find files with size 50mb+
ls -lahS $(find / -type f -size +50000k)
@neko-fire
neko-fire / PDF2Text
Created October 18, 2013 08:24
PDF to text converter class
<?php
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@neko-fire
neko-fire / custom git config
Last active December 25, 2015 19:09
Super git config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = REPO_URL
[gui]
wmstate = normal
@neko-fire
neko-fire / Shell: find and move file to destination
Created August 14, 2012 13:02
Shell: find and move file to destination
find . -name "*.pdf" -exec mv {} /workspace/pdf \;
@neko-fire
neko-fire / gist:2930118
Created June 14, 2012 12:57
PHP: Yii: set body ID
$this->setBodyId('staticContact');
@neko-fire
neko-fire / gist:2773988
Created May 23, 2012 08:51
Javascript: Grid viewer
javascript:function fnStartGrid(sUrl){var nScript = document.createElement('script');nScript.setAttribute('language','JavaScript');nScript.setAttribute('src',sUrl);document.body.appendChild(nScript);}fnStartGrid('http://www.sprymedia.co.uk/design/grid/media/js/grid-loader.js');
@neko-fire
neko-fire / gist:2768825
Created May 22, 2012 12:45
Shell: unmount drive -force
sudo umount -f /Volumes/FooBar