This file contains 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
# Set layout to spanish | |
$LanguageList = New-WinUserLanguageList es-ES | |
Set-WinUILanguageOverride -Language $LanguageList | |
Set-WinUserLanguageList $LanguageList -Force | |
Set-WinDefaultInputMethodOverride -InputTip "0409:0000040A" | |
Write-Output "Done" |
This file contains 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
$Interval = Read-Host -Prompt 'Write time interval in seconds. Default is 1 second' | |
if ($Interval -le 0) { | |
$Interval = 1 | |
} | |
if ($Interval -lt 0.25) { | |
$Interval = 0.25 | |
} |
This file contains 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
Write-Host "Shutdown timer..." | |
$Horas = Read-Host -Prompt 'Hours (can be 0)' | |
$Minutos = Read-Host -Prompt 'Minutes' | |
$Segundos = 0 | |
if ($Horas -eq 0) { | |
$Horas = 0 |
This file contains 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
{ | |
"LOG": { | |
"prefix": ["cl", "clog", "log"], | |
"body": ["console.log( ${1:string} );"] | |
}, | |
"LOG $": { | |
"prefix": ["clf", "logf"], | |
"body": ["console.log ( `${1:Texto} \\${${2:123}\\}` );"] | |
}, | |
"LOG DEBUG": { |
This file contains 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
// dump | |
mongodump --uri="mongodb://localhost:27017/dbName" --gzip --excludeCollection="collName" --archive="./dump" | |
// restore | |
mongorestore --uri="mongodb://localhost:27017/dbName" --gzip --drop --archive="./dump" |
This file contains 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
import { makeAutoObservable } from "mobx"; | |
import persist from "./persist"; | |
export default class UserStore { | |
constructor() { | |
makeAutoObservable(this); |
This file contains 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
const networkInterfaces = require("os").networkInterfaces(); | |
let IPv4; | |
Object.keys(networkInterfaces).forEach( device => { | |
networkInterfaces[device].forEach((details) => { | |
if (details.family === "IPv4" && details.internal === false) { | |
IPv4 = details.address; | |
}; | |
}); |
This file contains 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
// ----------------- | |
// router.js | |
// ----------------- | |
// URL: backend.com/uno?id=111 | |
app.get("/uno", controllerUno); | |
// URL: backend.com/dos | |
// BODY: {id: 222} |
This file contains 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
// package.json | |
{ | |
"scripts": { | |
"devToMaster": "git checkout dev && git pull && git checkout master && git pull && git merge dev && git push && git checkout dev", | |
"mergeTo": "git checkout %npm_config_from% && git pull && git checkout %npm_config_to% && git pull && git merge %npm_config_from% && git push && git checkout %npm_config_from%" | |
} | |
} | |
This file contains 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
/** | |
* Devuelve la profundidad de un pozo a partir del tiempo tanscurrido entre soltar una piedra y escuchar su sonido. | |
* La piedra se deja caer, no se tira. | |
* | |
* @param {number} segundos Número de segundos desde que sueltas la piedra hasta que escuchas el sonido. | |
* @return {number} Profundidad del pozo en metros. | |
*/ | |
const alturaPozo = (segundos) => { | |
NewerOlder