Skip to content

Instantly share code, notes, and snippets.

View Zingam's full-sized avatar

Hristo Hristov Zingam

  • Roccoor Multimedia
View GitHub Profile
@Zingam
Zingam / MakeDriveX.bat
Created March 14, 2016 14:29
Create persistent drive subst of a folder
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: This command will create a persistant drive subst of a folder accross
:: reboots and will also be available to command prompts with raised
:: privileges.
::
:: Example:
:: "C:\Users\HGH\Documents\Programming" will be mapped to drive "X:\"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: For details see:
:: http://superuser.com/questions/29072/how-to-make-subst-mapping-persistent-across-reboots
# Version format
version: 1.0.0.{build}
image:
- Ubuntu2004
- Visual Studio 2022
platform: x64
configuration:
@Zingam
Zingam / How-to-Install-Ubuntu.md
Created November 2, 2019 08:04
How to Install `Ubuntu 19.10+` alongside `Windows 10`

How to Install Ubuntu 19.10+ alongside Windows 10

Preparation

  1. In the laptop BIOS enable Legacy Boot (if the laptop supports UEFI/Legacy Boot) as dual-booting is problematic on UEFI enabled hardware.
  2. When booting enter the BIOS boot menu (e.g. by pressing F12) and select Legacy Boot.
  3. Create the required logical partions on the drive for Windows 10 and leave unalocated space for Ubuntu 19.10+.
# Version format
version: 1.0.0.{build}
image:
#- Ubuntu1804
- Visual Studio 2017
platform: x64
configuration:
@Zingam
Zingam / CMakeSettings.json
Created December 9, 2018 21:22
Blender build configuration file for VS2017: CMakeSettings.json
{
// See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file.
"environments": [
{
"CacheScript": "${workspaceRoot}\\build_files\\cmake\\config\\blender_lite.cmake",
}
],
"configurations": [
////////////////////////////////////////////////////////////////////////////
// MSVC-Ninja-x64-Debug

How to Pass Parameters to an Android App via Android Studio

  1. In Android Studio 3.1 open Run/Debug Configurations
  2. For the respective Configuration, e.g app under General->Launch Options->Launch Flags: add a key-value pair, e.g. --ei DAY_TIME 5. For more options see: Specification for intent arguments
  3. Read the key-value pair in Kotlin:
// Get the value with intent.extras[KEY_VALUE] which returns a value of type 
// Any!. Check for "null" and convert it to a string otherwise return a string 
@Zingam
Zingam / unsparse.bat
Created March 22, 2015 11:23
Unset the "sparse' flag of a file
REM Unsets "sparse" flag of a file.
REM Usage: Drag and drop the file onto the batch file.
fsutil sparse queryflag %1 pause
fsutil sparse setflag %1 0
fsutil sparse queryflag %1 pause
@Zingam
Zingam / DriveX_Map.reg
Last active April 12, 2017 17:00
DriveX_Map
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"X Drive"="subst X: \"C:\\Users\\HGH\\Documents\\Programming\""
@Zingam
Zingam / build-openssl-vs2013
Last active March 14, 2016 14:39
How to build OpenSSL on Visual Studio 2013 (64bit target)
How to build OpenSSL on Visual Studio 2013 (64bit target)
Note:
For some reason running the following commants from a .bat file won't work.
Use the Command Prompt.
Command Prompt:
VS2013 x64 Native Tools Command Prompt - for native builds for example if you
build for Windows 7 64 build you should use this Command Prompt.
VS2013 x86 Native Tools Command Prompt - use this if you are compiling on 32 bit
@Zingam
Zingam / QtCreatorAutoKits
Last active August 29, 2015 14:10
Qt Creator: Enabling standalone installation to automatically detect Qt SDK.
As it is currently, you can only hack that by symlinking /share/qtcreator/QtProject/
(or Qt Creator.app/Contents/Resources/QtProject/ on OS X) to the same path within your standalone Qt Creator
installation.
Example (Windows):
C:\Qt\qtcreator-3.2.82\share\qtcreator>mklink /d QtProject c:\qt\Tools\QtCreator\share\qtcreator\QtProject