Usage
Output:
Bretzel price: $42.56 (CUARENTA Y DOS PESOS CON 56/100)
Source code:
https://github.com/benoror/node-pate
NPM:
https://https://www.npmjs.com/package/node-pate
Bretzel price: $42.56 (CUARENTA Y DOS PESOS CON 56/100)
benoror@macmini:~/simpleapp $ git initThen I just zip and copy the project to the production server. After extract it I clone it as a bare repo:
benoror@macmini:~/simpleapp $ git add .
benoror@macmini:~/simpleapp $ git commit -a -m "First commit"
benoror@dreamhost:~ $ git clone --bare simpleapp simpleapp.gitThis bare repo will act as the main repo (who said central?). Then I just add a remote origin in my computer:
benoror@macmini:~/simpleapp $ git remote add origin ssh://benoror@production.com/~/simpleapp.gitI assume you already copied your SSH keys and credentials. The workflow is as follows:
benoror@macmini:~/simpleapp $ git push origin master
benoror@macmini:~/simpleapp $ ssh production.com
benoror@dreamhost:~ $ cd simpleapp
benoror@dreamhost:~/simpleapp $ git pull
benoror@gateway:~$ mkdir ~/dotfilesbenoror@gateway:~$ mkdir ~/dotfilesbenoror@gateway:~$ mv .bashrc ~/dotfiles/benoror@gateway:~$ mv .vimrc ~/dotfiles/benoror@gateway:~$ mv .vim ~/dotfiles/(... ... ...)benoror@gateway:~$ mv .ssh ~/dotfiles/
benoror@gateway:~$ ls -Ad /dotfiles/ | xargs -I _ ln -s _
benoror@gateway:~/dotfiles/$ echo "Welcome to my public dotfiles" > READMEbenoror@gateway:~/dotfiles/$ echo ".secret" >> .gitignore(...)benoror@gateway:~/dotfiles/$ echo ".ssh/*" >> .gitignore
benoror@gateway:~/dotfiles/$ git config --global user.name "Benji Orozco" benoror@gateway:~/dotfiles/$ git config --global user.email benoror@gmail.com
benoror@gateway:~/dotfiles/$ git init benoror@gateway:~/dotfiles/$ git add .benoror@gateway:~/dotfiles/$ git statusbenoror@gateway:~/dotfiles/$ git commit -a -m 'first commit'benoror@gateway:~/dotfiles/$ git remote add origin git@github.com:benoror/dotfiles.git benoror@gateway:~/dotfiles/$ git push origin master
That's It
Next article: Cloning Git Repos and mixing them with Dropbox
Para solucionarlo tenemos que agregar nuestro hostname a la primera linea asi:127.0.0.1 localhost
127.0.1.1 inspiron
Visto en: LinuxMint Wiki | Gentoo Forums127.0.0.1 localhost inspiron
127.0.1.1 inspiron
Desarrollé un robot humanoide en OpenGL y GLUT para una clase y se los comparto aquí. Mueve los miembros en todos los ejes y tiene limites "naturales". Código. Compilenlo asi: cc robot.c -lglut -lGL -lGLU -pthread -lm -Wall -o robot
RESULTS (means and 95% confidence intervals)--------------------------------------------Total: 3039.8ms +/- 0.6%
RESULTS (means and 95% confidence intervals)--------------------------------------------Total: 1821.2ms +/- 0.5%

JQuery nos da los metodos $.ajax, $.post y $get para manejar peticiones AJAX. Los dos últimos son derivados de $.ajax, con una interfaz mas simple. $.ajax es el más completo y nos permite manipular la petición a nuestro antojo como muestro a continuación:
function openAjax(url, data) {
$.ajax({
type: “POST”,
url: url,
data: data,
beforeSend: function() {
$(’#ajax’).hide();
$(’#ajax’).html(”);
$(’#ajax_loading’).fadeIn(’slow’);
},
success: function(callback) {
$(’#ajax’).html(callback);
},
complete: function() {
$(’#ajax_loading’).hide();
$(’#ajax’).fadeIn(’slow’);
},
error: function() {
$(’#ajax’).html(’Ajax ERROR.’);
}
});
}
#!/usr/bin/perl -w
#
# Default GNOME backgrounds feature by benji
# Originally Written by Michael Moore, Nov. 2007, placed in the public domain
#
# Requieres libxml-simple-perl
# $ sudo apt-get install libxml-simple-perl
#
use strict;
use warnings;
use XML::Simple;
my $switchTime = 300; # Edit to the number of seconds between photo switches
my $xml = new XML::Simple;
my $data = $xml->XMLin("/home/".getpwuid($<)."/.gnome2/backgrounds.xml");
my @photos;
my $temp;
foreach my $key (keys (%{$data->{wallpaper}})){
$temp = $data->{wallpaper}->{$key}->{filename};
if($temp ne "(none)") {
push(@photos,$temp);
}
}
chomp(@photos);
my $photo;
while(1)
{
$photo = $photos[rand($#photos)];
`gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$photo"`;
sleep($switchTime);
}
$ sudo apt-get install libxml-simple-perl
