Skip to content

Instantly share code, notes, and snippets.

Remove recursively a directory. This will wipe all the content in the folder.
###Linux
$ rm -r directory
Change user password
$ passwd username
First time SSH key generation
@VessoVit
VessoVit / FabricDjangoDefault.py
Last active July 30, 2021 12:49 — forked from anonymous/gist:156623
Default script for python/django deployment with Fabric.
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._
@VessoVit
VessoVit / funcition.php
Created March 3, 2012 23:43
Wordpress limit excerpt lenght
/* add in function.php */
<?php
function excerpt($limit) {
$excerpt = explode(' ', get_the_excerpt(), $limit);
if (count($excerpt)>=$limit) {
array_pop($excerpt);
$excerpt = implode(" ",$excerpt).'...';
} else {
$excerpt = implode(" ",$excerpt);
}