#Receta para la preparación rápida de Bruschettas a lo gonzo
##Ingredientes
- Pan Campesino
- Tomate
- Tocineta
- Ajo
- Perejil
- Aceite de Oliva
#Receta para la preparación rápida de Bruschettas a lo gonzo
##Ingredientes
require 'date' | |
arreglo = %w(Domingo Lunes Martes Miercoles Jueves Viernes Sabado) | |
dia = Date.today.wday | |
puts `t update "Hoy es #{arreglo[dia]}"` | |
#el comando "t update" es un comando de una gema de ruby para tuitear a traves de la consola | |
#link del repositorio https://github.com/GusGA/t | |
//Según la teoria: | |
//Un número perfecto es un número natural que es igual a la suma de sus divisores propios positivos, | |
//sin incluirse él mismo. | |
int numeroperfecto (int valor){ | |
int temp = (valor - 1); | |
int perfecto = 0; | |
do { | |
if (valor % temp == 0){ | |
perfecto += temp; | |
} |
Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.
Reset PS3 controller by inserting paperclip into pinhole near L2 button.
Connect PS3 controller to Mac with USB cable.
Enable Bluetooth.
int inversor_numero (long num){ | |
long n = num, digito; | |
printf( "El numero %l invertido es: \n", n ); | |
while( n > 0 ) | |
{ | |
digito = n % 10; | |
n /= 10; | |
printf( "%l\n", digito ); | |
} |
###Control-Eject
The dialog box "Are you sure you want to shut down your computer now?" appears with options to Restart, Sleep, Cancel or Shut Down. After the dialog appears, press the R key to Restart, press the S key to Sleep, press the Esc key to Cancel, or press the Return key to Shut Down.
###Control-Command-Eject
You can do this with the scp
command, which uses the ssh protocol to copy files across machines. It extends the syntax of cp to allow references to other systems:
scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file
Copy something from this machine to some other machine:
scp /path/to/local/file username@hostname:/path/to/remote/file
Copy something from another machine to this machine:
###Using Function constructor
var sum = new Function('a','b', 'return a + b;');
alert(sum(10, 20)); //alerts 30
###Using Function declaration.
function sum(a, b)
{
Let’s assume we want to simulate a 8 KByte/sec limit for port 80
####Step 1 – Define bandwidth rule
sudo ipfw pipe 1 config bw 8KByte/s
####Step 2 – Bind rule to port
sudo ipfw add 1 pipe 1 src-port 80