lifeinzeroone-blog
lifeinzeroone-blog
Life in Zero One
64 posts
Nothing special here
Don't wanna be here? Send us removal request.
lifeinzeroone-blog · 14 years ago
Text
Ubuntu 11.10 and Gnome 3: 0-day switch
The new all awesome Ubuntu is here, packed with Gnome 3.
I use linux 8-10 hours a day, including Ubuntu (desktop), Centos and Fedora (server). Last five years i have been using Gnome 2 as my default desktop, as a result i have reached a desktop interface that matched every single requirement i had.
Suddenly all of this ARE GONE.
I believe gnome 2 to be a mature, stable and "get the job done" environment without all the fuzzy gfx and bloat. But it seems gnome developers have other goals now, and i respect that and all the hard work they have done so far.
The solution is really simple.
Switch to XFCE4, 3-4 hours of customization and everything looks normal again.
10 notes · View notes
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Κέικ
1 note · View note
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Κέικ
0 notes
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Olivetti high print 4915
0 notes
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Olivetti high print 4915
0 notes
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Cactus
0 notes
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Cactus
0 notes
lifeinzeroone-blog · 14 years ago
Photo
freddos:
Φωτό από συνεργασία Ρουβά-Γιοκαρίνη! (κάτι σαν το “Freddos στο Fight Club” σήμερα στις 22:00)
(προφανώς εγώ ο Γιοκαρίνης)
Tumblr media
7 notes · View notes
lifeinzeroone-blog · 14 years ago
Text
Drupal devel sum query time
SELECT *, qid as tqid, (SELECT COUNT(*) FROM `devel_times` as dt WHERE tqid = dt.qid) as num, (SELECT SUM(time) FROM `devel_times` as dt WHERE tqid = dt.qid) as t, ((SELECT SUM(time) FROM `devel_times` as dt WHERE tqid = dt.qid) / (SELECT COUNT(*) FROM `devel_times` as dt WHERE tqid = dt.qid) * 1000) as median  FROM `devel_queries` as dq ORDER BY num DESC
30 notes · View notes
lifeinzeroone-blog · 14 years ago
Text
PHP dates in the past
The mktime()function allows the return of the UNIX timestamp of a given date, ie the number of seconds elapsed between 1 January 1970 and a specific date. However, in its current usage, it is usually necessary to define two timestamps for a certain period. Note that to convert the timestamps below dated MySQL (DATETIME), just use the date function as follows:
<? $mysql_datetime = date('Y-m-d H:i:s',$timestamp); ?>
Below are the mostly used examples:
Last 24 hours
The code below covers the past 24 hours so far:
<?php $startTime = mktime() - 24*3600; $endTime = mktime(); ?>
Yesterday
The code below works even if you are the 1st of the month or the 1st January of the year. It covers the period from yesterday at 00:00:00 to 23:59:59 yesterday:
<?php $startTime = mktime(0, 0, 0, date('m'), date('d')-1, date('Y')); $endTime = mktime(23, 59, 59, date('m'), date('d')-1, date('Y')); ?>
This week
The code below is assumed that the first day of the week is Monday. It covers the period from Monday morning at 00:00:00 to now:
<? $startTime = mktime(0, 0, 0, date('n'), date('j'), date('Y')) - ((date('N')-1)*3600*24); $endTime = mktime(); ?>
Last week
The code below is assumed that the first day of the week is Monday. It covers the period from Monday(15 day before) at 00:00:00 to next Sunday at 23:59:59:
<? $startTime = mktime(0, 0, 0, date('n'), date('j')-6, date('Y')) - ((date('N'))*3600*24); $endTime = mktime(23, 59, 59, date('n'), date('j'), date('Y')) - ((date('N'))*3600*24); ?>
This Month
The code below covers the period from 1 month to now (current month):
<? $startTime = mktime(0, 0, 0, date('m'), 1, date('Y')); $endTime = mktime(); ?>
Last 30 days (last 30 days)
The code below covers the period from 30 days ago to now:
<? $ starttime = mktime () - 30 * 3600 * 24; $ endTime = mktime (); >
Last month
The code below covers the period from last month:
<? $startTime = mktime() - 30*3600*24; $endTime = mktime(); ?>
Current year(this year)
The code below covers the period from January 1st to now at 00:00:00:
<? $startTime = mktime(0, 0, 0, 1, 1, date('Y')); $endTime = mktime(); ?>
Last year (last year)
The code below covers the previous year, from January 1, at 00:00:00 to 31 December at 23:59:59:
<? $startTime = mktime(0, 0, 0, 1, 1, date('Y')-1); $endTime = mktime(23, 59, 59, 12, 31, date('Y')-1); ?>
2 notes · View notes
lifeinzeroone-blog · 14 years ago
Text
Wifi error android galaxy mini
*#*#526#*#* it'll display "driver installation successful" or something similar, and then Wifi magically works.
0 notes
lifeinzeroone-blog · 14 years ago
Text
Jquery Disable form submit on enter
$('#node-form input[type=text]').bind('keypress', function(e) {    if(e.keyCode==13){       return false;    } });
8 notes · View notes
lifeinzeroone-blog · 14 years ago
Text
Auto gzip mysql dump
mysqldump -u username -h localhost -p database_name | gzip -9 > backup_db.sql.gz
3 notes · View notes
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Samos international airport (smi)
4 notes · View notes
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Samos vathi fog
8 notes · View notes
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Samos
1 note · View note
lifeinzeroone-blog · 14 years ago
Photo
Tumblr media
Athens metro
8 notes · View notes