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
git filter-branch --index-filter "git rm --cached -f -r --ignore-unmatch <file/folder name>" -f --prune-empty -d "<tempDirectory>" -- --all |
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
Get-Content sourcefile.txt -ReadCount 5000 | |
| Foreach-Object {$_.Replace('OldText', 'NewText')} | |
| Set-Content result.txt |
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
#!/usr/bin/pwsh | |
$Audit = (yarn npm audit -A --json | ConvertFrom-Json) | |
"##teamcity[blockOpened name='YarnAudit' description='yarn npm audit -R -A']" | |
Foreach ($advisory in $Audit.advisories.PSObject.Properties){ | |
$overview = $advisory.Value.overview -replace('[\|]', '||') -replace('[\[]', '|[') -replace('[\]]]','|]') -replace('[\n]', '|n') -replace('[\r]', '|r') -replace('['']', '|''') -replace('\\u','|0x') | |
"##teamcity[buildProblem description='Advisory for $($advisory.Value.findings[0].paths[0].Split('>')[-1]): $($advisory.Value.url) | $overview' identity='VulnerableDependency']" | |
} | |
"##teamcity[blockClosed name='YarnAudit']" |
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
extern crate reqwest; | |
extern crate serde_json; | |
extern crate google_translate3 as translate; | |
use std::fs::File; | |
use std::io::{Read, Write}; | |
fn main() -> Result<(), Box<dyn std::error::Error>> { | |
// Replace with your filenames | |
let english_file = "i18n_en.json"; | |
let target_lang = "es"; |