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
#Copies and restore from DB_A to DB_B | |
Copy-DbaDatabase -Source $TestDB -SourceSqlCredential (Get-Credential CDC_User) -Destination $TestDB -DestinationSqlCredential (Get-Credential CDC_User) -Database CDC -NewName CDC_Test -WithReplace -BackupRestore -UseLastBackup -Force | |
#others: | |
#Backup-DbaDatabase -SqlInstance $localDb -Database TEST_DB -BackupDirectory C:\Temp\DatabaseBCKUP -IgnoreFileChecks | |
#Backup-DbaDatabase -SqlInstance $TestDB -SqlCredential (Get-Credential CDC_User) -Database CDC | |
#Backup-DbaDatabase -SqlInstance $devDB -SqlCredential (Get-Credential SCALE) -Database CDC -IgnoreFileChecks -BuildPath -BackupDirectory \devDB |
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
Private Sub Worksheet_SelectionChange(ByVal Target As Range) | |
Dim i As Integer | |
Dim regEx As Object | |
Set regEx = CreateObject("VBScript.RegExp") | |
Dim strInput As String | |
Dim strPattern As String: strPattern = "^[a-zA-Z0-9]{9}[a-zA-Z0-9-]{2}[0-9]{6}" | |
For i = 2 To 10000 | |
strInput = Sheet1.Cells(i, 1).Value | |
If (strInput <> "") Then |
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 util = require('util'); | |
const fs = require('fs.extra'); | |
const path = require('path'); | |
// const { exec } = require('child_process').exec; | |
const exec = util.promisify(require('child_process').exec); | |
// async fs function | |
fs.readdirAsync = dirname => { | |
return new Promise(function(resolve, reject) { | |
fs.readdir(dirname, function(err, filenames){ |
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
Private Sub CommandButton1_Click() | |
Dim ibanStr, result As String | |
Dim i As Integer | |
Dim rr As Boolean | |
i = 2 | |
' ibanStr = InputBox("Enter IBAN", "As a String") | |
' result = VALIDATEIBAN(ibanStr) | |
' MsgBox (result) |
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
Private Sub CommandButton1_Click() | |
Dim i, x As Integer | |
i = 2 | |
While Sheet1.Cells(i, 2) <> Empty | |
x = 2 | |
While Tabelle1.Cells(x, 2) <> Empty | |
If (Sheet1.Cells(i, 2) = Tabelle1.Cells(x, 2)) Then | |
Sheet1.Cells(i, 8) = "done" | |
Tabelle1.Cells(x, 124) = "YES" |
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
public JsonResult Consecutivo(string id) | |
{ | |
string letra = id.Substring(0, 1); | |
int centecima = int.Parse(id.Substring(1, 1)); | |
int decima = int.Parse(id.Substring(2, 1)); | |
int unidad = int.Parse(id.Substring(3, 1)); | |
char[] alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(); | |
if (unidad<9) | |
{ | |
unidad++; |
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
curl -u 'juancho618' https://api.github.com/user/repos -d '{"name":"ReservasRuby"}' | |
# Remember replace USER with your username and REPO with your repository/application name! | |
git remote add origin git@github.com:juancho618/ReservasRuby.git | |
git push origin master |
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
curl -i -u "my_user_name:my_password" -X PUT -d '' 'https://api.github.com/repos/my_gh_userid/my_repo/collaborators/my_collaborator_id' |