Skip to content

Instantly share code, notes, and snippets.

View vhanla's full-sized avatar
🖥️
Programming 4 fun 🐱‍💻

vhanla

🖥️
Programming 4 fun 🐱‍💻
View GitHub Profile
@vhanla
vhanla / Visual C++.sublime-build
Last active May 5, 2021 12:42 — 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", "/Za", "${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%;path:/to/folder/where/cl.exe/located",
// e.g. "path" : "%PATH%;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\",
// this also will set path for vcvars32.bat
@vhanla
vhanla / buildchmlibandinstallpychm.cmd
Created September 2, 2016 10:05
Build CHMlib on Windows and also PyCHM setup fix
@echo off
rem author: vhanla
rem If you want to install PyChm on Python (2.7) in Windows (32bits), you might get stuck on errors by trying to build using
rem Microsoft Visual C++ Compiler Package for Python 2.7 because it won't be capable to build chmlib (chm.lib)
rem So to fix that you need to build it manually, but here is a batch that will built it and setup automatically:
set currentdir=%~dp0
if exist "%CD%\chmlib\" goto building
goto gitchmlib
@vhanla
vhanla / giturl.cmd
Created October 16, 2016 01:15
Launch git remote url batch (.cmd / .bat)
@echo off
::Author : vhanla
::Filename : giturl.cmd
::Description : gets remote url inside a git directory and opens it in the default web browser
::Requirement : Windows
::alternative git command: git config --get remote.origin.url
for /f "tokens=*" %%i in ('git ls-remote --get-url ^') do (echo Opening %%i ... & start "" %%i)
@vhanla
vhanla / Aardio.sublime-syntax
Last active February 6, 2020 13:25
Aardio Syntax Highlighter for SublimeText 3, place it inside Data/Packages/User directory
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Aardio
file_extensions: [aardio, aau]
scope: source.aardio
contexts:
main:
- match: '^\s*(import)\s+([^ ;]*);'
scope: meta.keyword.using.source.aardio
@vhanla
vhanla / profile.ps1
Last active February 1, 2019 14:47
Custom user profile Agnoster like theme for PowerShell
#Author: vhanla
#Force coloring of git and npm commands
$env:TERM = 'cygwin'
$env:TERM = 'FRSX'
$global:foregroundColor = 'white'
$time = Get-Date
$psVersion= $host.Version.Major
$curUser= (Get-ChildItem Env:\USERNAME).Value

Just some notes and references for myself.

  • In bash, you can access your C:\ drive via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

@vhanla
vhanla / vpress.ps1
Created May 18, 2018 04:21
PowerShell script to help maintain git on Vuepress's built directory
# This script allows to maintain a github hosted page
# First: make sure to clone or init your git in the destination directory
# this script will make a backup of the .git directory
# once vuepress has built again (replacing all things in destination directory)
# this script will restore the original .git directory
# Finally you can git add . & commit as you wish
# so .git directory will always be the latest one
cls
Write-Host "Vuepress git tool v1.0"
@vhanla
vhanla / taskbaropacity.cmd
Last active January 18, 2023 14:25
Ajusta el nivel de transparencia de la barra de tareas de Windows 10 version 1803+
@echo off
cls
:OPTIONS
echo.
echo TaskbarOpacity v1.1 ES
echo Descripcion: Ajusta el nivel de transparencia de la barra de tareas.
echo Requisitos: Windows 10 version 1803 o superior, activado.
echo Autor: vhanla
echo.
@vhanla
vhanla / taskbaropacity.bat
Last active October 24, 2023 06:47
Change Windows 10 Acrylic Taskbar Opacity
@echo off
cls
:OPTIONS
echo.
echo TaskbarOpacity v1.1 EN
echo Description: Adjusts Windows 10 taskbar transparency level.
echo Requirements: Windows 10 version 1803 or above, activated.
echo Author: vhanla
echo.