Skip to content

Instantly share code, notes, and snippets.

View VictorTpo's full-sized avatar

Victor Thépaut VictorTpo

View GitHub Profile

Remove old kernels files

You can see should restart the server when you see *** System restart required *** when you start ssh
You can restart with sudo shutdown -r now
You can see your current kernel version with uname -r
You can see all kernel versions in /lib/modules/

1) Delete perimated packages

sudo apt-get autoclean

Pour avoir du joli code, il faut partir de la vue et remonter.

EXEMPLE : "Qu'est-ce que je veux VOIR (et non avoir)"

Ben je afficher :

@ma_var.value

Et hop une belle vue !

activity_log
boss_news
delayed_job
link_posts
link_tweets
posts
rating_histories
tweets
{
"always_show_minimap_viewport": true,
"color_scheme": "Packages/User/enlightened.tmTheme",
"default_line_ending": "unix",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_face": "Source Code Pro for Powerline",
"font_size": 14,
"highlight_modified_tabs": true,
"rulers": [80],

Create mails with a new domain name

go to http://www.google.fr/intl/fr/enterprise/apps/business/products/gmail/

###Account Start it, fill fields...

###Check the domain Go to configuration, and valid the 2 first steps #####Step "google-site-verification" : On OVH, go to your domain, DNS area, add new entry. Choose TXT and set the value with google-site-verification=a_really_fat_string.

  • Apache conf
  • Enable URL with OVH

Apache conf

cd /etc/apache2/sites-available

touch my-url.domaine.com.conf

Faye & Rails 4

This gist describes how to implement faye with a rails 4 application.

What I want ?

A user receives a live notification when another user login.

Requirements

A rails 4 application with devise for user management

2 gems:

> top
# see all process
> ps -fp p_id
> df -k
# free space of disks

#CAPISTRANO CMD

####Deploy current branch

> cap <ENV> deploy

####Maintenance

> cap <ENV> maintenance:on REASON='foo bar' ALLOWED_IPS='xxx.xxx.xx.xxx'