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
@echo off | |
echo - This scripts automates process of installing Windows Subsystem for Linux (WSL) | |
REM Due some limitations, this script has to be can't be executed under PowerShell | |
Get-ChildItem >nul 2>&1 | |
if %errorLevel% == 0 ( | |
echo # Swich to CMD | |
cmd /c start "" %0 | |
exit 0 | |
) |
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
@echo off | |
set CPath=$E[92m | |
set CPathAdmin=$E[93m | |
set CInd=$E[90m | |
set CReset=$E[90m | |
rem Simple "ver" prints empty line before Windows version | |
rem Use this construction to print just a version info | |
cmd /d /c ver | "%windir%\system32\find.exe" "Windows" |
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
@ECHO OFF | |
SET "LINUXTMP=$(echo '%TMP:\=\\%' | sed -e 's|\\|/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/mnt/\L\1\E/\2|')" | |
echo LINUXTMP = "%LINUXTMP%" | |
ECHO --- PulseAudio... | |
C:\Windows\System32\bash.exe -xc "wget -cO '%LINUXTMP%/pulseaudio.zip' 'http://bosmans.ch/pulseaudio/pulseaudio-1.1.zip'" | |
ECHO --- Extracting PulseAudio | |
md "%TMP%\pulseaudio" |
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
@echo off | |
echo - This scripts automates process of installing Windows Subsystem for Linux (WSL) | |
REM Due some limitations, this script has to be can't be executed under PowerShell | |
Get-ChildItem >nul 2>&1 | |
if %errorLevel% == 0 ( | |
echo # Swich to CMD | |
cmd /c start "" %0 | |
exit 0 | |
) |
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
#include <functional> | |
struct Base { | |
virtual void f() const = 0; | |
}; | |
int main() { | |
struct : public Base { | |
void f() const override {} | |
} a, b; // vTables of 'a' and 'b' contain nulls | |
// not crucial for problem, helps to emphasize problem |
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/share/applications/code-url-handler.desktop | |
[Desktop Entry] | |
Name=Visual Studio Code - URL Handler | |
Comment=Code Editing. Redefined. | |
GenericName=Text Editor | |
Exec=/usr/share/code/code --open-url %U | |
Icon=code | |
Type=Application | |
NoDisplay=true | |
StartupNotify=true |
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
# For when for some reason these apps are failing like: | |
# - unable to open Photos | |
# - Cannot type right after pressing 'Win' button | |
# source: https://answers.microsoft.com/en-us/windows/forum/windows_10-win_cortana/cant-type-in-windows-10-search-bar/7dce8411-8671-4d3e-90d1-b9bdc0aa4734 | |
Get-AppXPackage -AllUsers |Where-Object {$_.InstallLocation -like "*SystemApps*"} | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} |
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
@rem File is based on CmdInit.cmd from ConEmu folder | |
@rem To make it work, it's required to change tasks in XML | |
@echo off | |
:: I would like to achieve efect like: | |
:: User@PC PATH | |
:: Where @ becomes # if admin | |
rem Simple "ver" prints empty line before Windows version |
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/env python | |
api_key = "" #API KEY | |
blog = "devopsreactions.tumblr.com" | |
url_info = "https://api.tumblr.com/v2/blog/{blog}/info?api_key={api_key}" | |
url_posts = "https://api.tumblr.com/v2/blog/{blog}/posts/text?api_key={api_key}&offset={offset}" | |
def get_info(): | |
return url_info.format(api_key=api_key, blog=blog) |
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
@echo off | |
chdir D:\APP\CYGWIN_SETUP | |
IF NOT EXIST CYGWIN_SETUP ( | |
mkdir CYGWIN_SETUP | |
) | |
chdir D:\APP\CYGWIN_SETUP | |
wget http://cygwin.com/setup-x86.exe -O setup-x86.exe | |
setup-x86 --arch x86 --quiet-mode --no-admin --no-startmenu --no-desktop --no-shortcuts --root C:\cygwin --site http://cygwin.mirror.constant.com --packages libuuid1,libuuid-devel,make,gettext-devel,libgettextpo-devel,libgettextpo0,libintl-devel,libintl3,libintl8,gettext |
NewerOlder