Open source, Linux, VIM, PHP, Ruby, Python, Symfony, Rails, SQL, Javascript, JQuery, whatever... - tips&tricks.
Showing posts with label php. Show all posts
Showing posts with label php. Show all posts
Tuesday, October 25, 2011
Rogozińskie Przedszkolaki :)
Przedszkolaki mają nową stronkę, wygląda trochę lepiej niż stara (nie moja) :)
http://przedszkole-rogozno.pl
Symfony2 + JQuery
Thursday, September 8, 2011
PHP Ubuntu simple server monitoring script
Simple PHP monitoring script.
Change hosts variable (array) and path to icon file (-i /usr/share/icons/Faenza/status/scalable/error.svg).
You can use it in your crontab: Edit your cron settings:
and insert:
(change /home/exu/scripts/monitoring to path to your file) Enjoy!
Change hosts variable (array) and path to icon file (-i /usr/share/icons/Faenza/status/scalable/error.svg).
You can use it in your crontab: Edit your cron settings:
crontab -e
and insert:
* * * * * php /home/exu/scripts/monitoring
(change /home/exu/scripts/monitoring to path to your file) Enjoy!
Friday, July 29, 2011
Symfony 2 już dostępne
Symfony 2 nareszcie dostępne, juz mam kilka projektów na DEV, wygląda naprawdę super, developerzy wykonali naprawdę kawał dobrej roboty.
Wednesday, June 8, 2011
Faster PHP? Kick off getters and setters.
In PHP getters and setters sucks on performance.
Output on my Ubuntu VM (PHP 5.3.5):
WTF? How many getters/setters You use in your project per request?
Source: Let's make the web faster by Google
Output on my Ubuntu VM (PHP 5.3.5):
test_getters_setters: 0.64945447444916 test_public_properties: 0.27986690998077 test_magic_methods: 1.0444820642471 test_array_access: 0.9640593290329
WTF? How many getters/setters You use in your project per request?
Source: Let's make the web faster by Google
Friday, May 20, 2011
VIM + PHP: key mapping to find parent class
I love VIM power
Use with generated ctags!
BONUS! your VIM cowsay powered:
1. cowsay needed!
2. Ubuntu installation:
map <Leader>] /extends /e<CR>:normal l<CR><C-]>
Use with generated ctags!
BONUS! your VIM cowsay powered:
vmap <C-S-F1> yo<esc>:r !cowsay <C-r>"<cr>0. select block of text and press Control-Shift-F1 key.
1. cowsay needed!
2. Ubuntu installation:
sudo apt-get install cowsay
Friday, May 6, 2011
Wednesday, March 30, 2011
Image src = data: szybki skrypt w PHP
Ja mam poniższy skrypt zapisany jako plik image_to_data (w katalogu ~/scripts, który jest dodany do $PATH).
- 2 parametr: mime (domyślnie ustawiłem image/png)
A Oto wynik
Skrypt:
(zobacz też jak zrobić coś takiego jako plugin do VIM'a w pythonie)
image_to_data http://www.blogger.com/img/logo40.png image/png- 1 parametr: URL
- 2 parametr: mime (domyślnie ustawiłem image/png)
A Oto wynik
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAoCAMAAAArH/PVAAAAYFBMVEUNQIDCz988ZZhKcKAcTIhoiLArWJDw8/f///93lLiGn7+zw9f/jEFZfKiVq8ekt8/R2+fh5+//17y4Wyb/5tXrYwt3UUj/eSD/ZgD/cBApRHH/xp9DSGP/9e//tYT/gzDYtauvAAAAAXRSTlMAQObYZgAAAtNJREFUeF7t2OluozAUBeDrfWPP3mXm/d9yMMcuoU0JQinpjzlVa12CpU92bxJMRC/H3eE8k8Pu+EKb5213vpvd29aqF6juubZer+N5UY4bs3bLWLuNWYdlrMPGrPPCPJN1KlJ+E6vobM77n8tvYb1ClGF/n87KqjlXBpQWaWqRa6N/jlXYz+lusvwI97kWP8fq7JcUsyxwfph1sl/z+h3LE/GmH8ODWZxzIk7xd7qH+2IIim6GRTrCH8wCiRP/zCpQdTDOsegGSzjFKUcrpYm4kEMlS8eJtNAAlN6XSSI4kfBef7CGnynr9TIU76j+3FmtZsJyJkrbZKxiUSvsNCkTb+fWmoHSjnfG6cHmF0CbsG5mf7nN0k0/qsyCF0FVoeg1bHxXibaoMqnkYA1lWMpCiu87saIrlo6Iqo6rkCrLKmPBauNl31qwmji3ShSb4miS9aygr1kVxugqiRw8AgOPZEkyKlHVmCCJQFJePoplzfUmsr4mCDyQ8VVsYgkIhX7EjBIXBVgT0HqWJ5JxNHpkYV3yyEYsy3MwAtcw1uAi5j2Khe2q1rCYRRaz8AaBnLo7LAHAOlbDhvCFLCAAvcNyU1aDFuRYw/S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