martes, 14 de mayo de 2013
CodeIgniter global variable
class MY_Controller extends Controller {
var $data;
//constructor function
}
class Contact extends Controller { //to.. }
class Contact extends MY_Controller {
$this->load->view('contact_view', $this->data);
}
lunes, 6 de mayo de 2013
Apache Restart / Stop
Restart Apache 2 web server, enter:
# /etc/init.d/apache2 restart
If you are using Ubuntu use sudo:
$ sudo /etc/init.d/apache2 restart
To stop Apache 2 web server, enter:
# /etc/init.d/apache2 stop
$ sudo /etc/init.d/apache2 stop
To start Apache 2 web server, enter:
# /etc/init.d/apache2 start
$ sudo /etc/init.d/apache2 start
domingo, 5 de mayo de 2013
Downloading file from my server to my local
To download the file "serials.txt" from your remote home dir to the local computer:
scp user@server.com:serials.txt .
To download the remote file "something" using it's full path to your local computer:
scp user@server.com:/path/to/file/something.txt .
Now the tricky part: using the recursive switch (-r) to download a whole folder to your local computer. The issue you may have is that you DO NOT place a trailing forward slash after the directory name. For instance, this command will NOT work (notice the bold forward slash):
scp -r user@server.com:/path/to/directory/ .
This will give you a message saying the server is trying to write to the parent directory. REMOVE the last foward slash on the path and try again. The next command is CORRECT:
scp -r user@server.com:/path/to/directory .
I have been using a period when talking about downloading so far. Reason: this brings the file into the directory you are currently in. If you wish to take the last command and download it to somewhere else, the command would be:
scp -r user@server.com:/path/to/directory /new/local/location/
viernes, 3 de mayo de 2013
¿Cómo contar las líneas de un fichero / archivo en linux?
$ wc –l archivo
jueves, 25 de abril de 2013
How to remove all .svn directories from my application directories
Before running a command like that, I often like to run this first:
find . -name .svn -exec ls {} \;
Apuntes subversion
martes, 23 de abril de 2013
Como saber que programas tengo instalados en mi ubuntu
Fácil, vez a consola y ejecuta:
dpkg --get-selections | grep -v deinstall
Si la lista es larga y quieres puedes generar un archivo por ejecplo en tu ruta por defecto, tu home:
dpkg --get-selections | grep -v deinstall > paquetes-instalados-en-ubuntu
...espera! quieres la lista más completa y con fechas???
prueba esto:
cat /var/log/dpkg.log | grep "status installed"
Diferencia entre apt-get update y apt-get upgrade
Seguramente, muchas veces hemos usado:
# apt-get update
# apt-get upgrade
Pero, ¿qué hace cada orden o comando?
Cuando nosotros utilizamos #apt-get update, lo que en realidad estamos haciendo es actualizar los repositorios --ver si hay algo nuevo--, es decir actualizar la lista de todos los paquetes, con la dirección de dónde obtenerlos para que a la hora de hacer la búsqueda y su posterior descarga, sea más rápida.
En cambio, cuando utilizamos #apt-get upgrade, lo que hacemos es una actualización de nuestro sistema con todas las posibles actualizaciones que pudiera haber, es decir no sólo actualiza nuestro sistema operativo sino que también las aplicaciones que están contenidas en los repositorios.
En resumen: el update lista los paquetes de los repositorios y el upgrade instala las actualizaciones.
viernes, 30 de marzo de 2012
Who owns facebook?

jueves, 29 de marzo de 2012
All Facebook Pages Will Automatically Change to Timeline On March 30th! What You Need To Do Today.
We shared the exciting updates from Facebook regarding the new Timeline capabilities for Fan Pages a few weeks back. It was a voluntary option back then. But, as of tomorrow, all fan Pages will become Timeline.
Publish your new fan Page Timeline by tomorrow, or Facebook will automatically create a default for you.
So now is the time! Go to your Page on Facebook (log in as yourself) and hit Publish Now.
Here’s an example, showing the transition from our old Webtrends Page to our new Timeline:
What You Need To Do
Below is a list of the Timeline features you should incorporate that will help you pump up your Page, and ultimately help boost your fan engagement:
| 1. | Upload a Cover Photo |
The cover photo is a prominent, eye-candy picture that displays on top of your Timeline Page. It can be up to 851px by 315px. Be mindful of Facebook’s policies about your cover photo.Cover photos cannot include:
- Price or purchase information, such as “40% off” or “Download it at our website”.
- Contact information such as a website address, email, mailing address, or information that should go in your Page’s “About” section.
- References to Facebook features or actions, such as “Like” or “Share” or an arrow pointing from the cover photo to any of these features.
- Calls to action, such as “Get it now” or “Tell your friends”.
- Covers must not be false, deceptive or misleading, and must not infringe on third parties’ intellectual property
| 2. | ‘Pin’ or ‘Highlight’ your most important or engaging posts, each week
|
| 4. | Update your App thumbnails |
With Timeline, your App thumbnail is no longer 75×75 pixels but displays as a 111x74px image. You can adjust these images by clicking to ‘Manage’ from the Admin Panel, choose ‘Edit Page’ in the drop-down menu. Under the ‘Apps’ section, click ‘Edit Settings’ for the specific app image you’d like to adjust and it will allow you to change the image, and the name of that App.
| 5. | Take advantage of the larger App width |
The width of the new tabs are 810px by default, and Apps can either be set to 520px or 810px wide on a Page tab now. To take advantage of this full width, publish your App in the WebTrends Social platform using the Advanced Publish flow. Then, make sure to update your App Settings on Facebook by selecting the ‘Wide’ (810px) option in the Developer App (https://developers. facebook.com/apps) under ‘Edit App’. If you have published your Apps with the Easy Publish flow, they will still be displayed with the narrow width of 520px (centered in the Page tab). We will soon update this to 810px wide and notify you prior to the change.
We encourage you to start updating your apps to the full 810px width now!
| 6. | Manage your Page through the Admin Panel |
Use the Admin Panel to view Page Insights and keep track of new activity on your fan Page. Facebook users (whether they are your Page fans or not) can now contact you privately using direct messages. Notifications about new messages will appear right in your Admin Panel. Make sure to respond promptly to your users and keep your community management going!
Entradas populares
-
¿Cómo usar clases anidadas en CSS ? Para que nos entendamos, usar clases anidadas o identificadores anidados quiere decir poner varias propi...
-
Cambiando las cabeceras conseguimos que se refresque la página sin tener que forzar una recarga de nuestro navegador. $this-...
-
Do you remember when people would talk about ways to do things on your computer without using the mouse? Well, even though times are changin...
-
¿Qué es una expresión regular ? Una expresión regular , a menudo llamada también patrón, es una expresión que describe un conjunto de cade...
-
Crontab is a program used in linux to execute schedule scripts. If you need to run one script after rebooting the server you can use @reboot...
-
public function guardarImagen($object){ $directorio = IMG_PATH. '/' .$object-> directorio . '/' ; $n...
-
Recuperar lista de paquetes instalados En muchas ocasiones tenemos la necesidad de replicar una instalación en varios puestos de trabajo. ...
-
It's not necessary to use global variable in codeigniter, you can do this: class MY_Controller extends Controller { var $data; ...
-
Cómo ver todas las contraseñas guardadas en Chrome chrome://settings/passwords
-
Install mysql $ apt-get install apache2 $ apt-get install mysql-server $ apt-get install php5 $ apt-get install libapache2-mod-php5 $ ...