Skip to content

Instantly share code, notes, and snippets.

View rafamoreira's full-sized avatar
:shipit:

Rafael Moreira rafamoreira

:shipit:
View GitHub Profile
@rafamoreira
rafamoreira / Quote.pm
Created July 24, 2012 04:01
Quote.pm to work properly the get currency from gnucash
#!/usr/bin/perl -w
#
# Warning: This file has been edited to fix currencies not working because
# the Yahoo page has changed. You should keep an eye out for an official
# fix and use that when it comes out. This file may cause future problems
# keep the old one available.
#
#
# Copyright (C) 1998, Dj Padzensky <[email protected]>
# Copyright (C) 1998, 1999 Linas Vepstas <[email protected]>
@rafamoreira
rafamoreira / gist:3139335
Created July 18, 2012 22:22
Brightness adjust for linux
If the driver of your graphics card supports it, then you can use xrandr.
The following command lists the current configuration:
xrandr --current --verbose
If you want to change the configuration of an output, then you need the name of the output. This name is part of the output of xrandr --current, for example LVDS1.
The brightness can be changed like this:
@rafamoreira
rafamoreira / gist:3098659
Created July 12, 2012 15:02
Modelo de Cronjob para backup mensal
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
#m h dom mon dow user command
0 3 1 * * root php /local_script/bk.php
30 3 1 * * root php /local_script/upload.php
@rafamoreira
rafamoreira / gist:3092285
Created July 11, 2012 18:43
A nice way to handle Apache vhosts on OSX
$ mkdir ~/code
$ touch ~/code/apache-settings/httpd-vhosts.conf
$ sudo ln -s ~/code/apache-settings/httpd-vhosts.conf /etc/apache2/other
$ mkdir ~/code/apache-settings/logs
$ chmod 0777 ~/code/apache-settings/logs
#
# Use name-based virtual hosting.