This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.time('someFunction'); | |
someFunction(); // run whatever needs to be timed in between the statements | |
console.timeEnd('someFunction'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backup Database ADMINFACELE TO DISK='C:\PRUEBAS\test.bak' | |
RESTORE DATABASE TDR | |
FROM DISK='C:\PRUEBAS\test.bak' | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -C "[email protected]" | |
type %userprofile%\.ssh\id_rsa.pub # En cmd.exe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
CASE | |
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '8%' THEN 'SQL2000' | |
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '9%' THEN 'SQL2005' | |
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '10.0%' THEN 'SQL2008' | |
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '10.5%' THEN 'SQL2008 R2' | |
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '11%' THEN 'SQL2012' | |
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '12%' THEN 'SQL2014' | |
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '13%' THEN 'SQL2016' | |
WHEN CONVERT(VARCHAR(128), SERVERPROPERTY ('productversion')) like '14%' THEN 'SQL2017' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```sh | |
sudo apt-get install cifs-utils smbclient | |
sudo mount.cifs //IP/Cursos /home/punto_montaje/DIRECTORIO -o user=pepito dom=DOMINIO pass=PASSWORD | |
sudo umount /home/punto_montaje/DIRECTORIO | |
#https://www.upv.es/contenidos/INFOACCESO/infoweb/infoacceso/dat/724147normalc.html | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/ssh/sshd_config | |
KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 | |
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr | |
ssh-keygen -A | |
sudo service ssh restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE master; | |
GO | |
EXEC sp_configure 'show advanced option' | |
USE master; | |
GO | |
EXEC sp_configure 'show advanced option', '1'; | |
RECONFIGURE WITH OVERRIDE; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Task = function(data){ | |
this.name = data.name; | |
this.completed = false; | |
} | |
Task.prototype.complete = function(){ | |
console.log('Completed task: ' + this.name); | |
this.completed = true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
touch F{1..9} "Crea los ficheros desde el 1 hasta el 9" | |
Ejemplo: F1 F2 F3 F4 F5 F6 F7 F8 F9 | |
touch F{1..100} "Crea los ficheros desde el 1 hasta el 100" | |
Ejemplo: F1 F2 F3 F4 F5 F6 F7 F8 F9...F100 | |
touch F{a..z} "Crea los ficheros desde la a hasta la z" | |
Ejemplo: Fa Fb Fc Fe...Fz | |
mkdir D{1..9} "Crea los directorios desde el 1 hasta el 9" | |
Ejemplo: D1 D2 D3 D4 D5 D6 D7 D8 D9 | |
mkdir D{1..100} "Crea los directorios desde el 1 hasta el 100" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Sinco = function(){}; | |
function ObserverList(){ | |
this.observerList = []; | |
} | |
ObserverList.prototype.add = function(obj){ | |
return this.observerList.push(obj); | |
}; |