Skip to content

Instantly share code, notes, and snippets.

View vegetaz's full-sized avatar
🏠
Working from home

Nguyễn Văn Vận vegetaz

🏠
Working from home
View GitHub Profile
@vegetaz
vegetaz / Convert-Encoding.ps1
Created April 19, 2019 06:08 — forked from jamesfdickinson/Convert-Encoding.ps1
Convert all files to UTF-8 using powershell
Param (
[Parameter(Mandatory=$True)][String]$SourcePath
)
Get-ChildItem $SourcePath\* -recurse -Include *.json,*.html,*.xml,*.js,*.txt,*.css | ForEach-Object {
$content = $_ | Get-Content
Set-Content -PassThru $_.Fullname $content -Encoding UTF8 -Force}
@vegetaz
vegetaz / Visual C++.sublime-build
Created January 17, 2017 23:08 — forked from mikhdm/Visual C++.sublime-build
Visual C++ build system for sublime text to exec and compile .c and .cpp files from Subime Text editor.
{
"cmd": ["vcvars32.bat", "&", "cl", "/EHsc", "${file}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.cpp, source.c++",
// By default cl is not in your PATH, so add it to your path (preferably)
// or uncomment "path" and check that it has correct value
//"path": "path:/to/folder/where/cl.exe/located",
// this also will set path for vcvars32.bat
"shell": true, // Without this sublime has hard times to parse "&" in out command line