Skip to content

Instantly share code, notes, and snippets.

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

Alexandr Zhuravlev alezhu

🏠
Working from home
View GitHub Profile
@asheroto
asheroto / Set-EnvironmentVariable.ps1
Last active August 3, 2024 09:06
Functions to instantly get, set, or delete an environment variable. Bypasses the typical delay experienced with Environment.SetEnvironmentVariable, which can be slow due to its broadcasting a message to all top-level windows. These functions offer a more efficient alternative for getting, setting, or deleting environment variables.
# See this for more info:
# https://stackoverflow.com/questions/4825967/environment-setenvironmentvariable-takes-a-long-time-to-set-a-variable-at-user-o
function Set-EnvironmentVariable {
<#
.SYNOPSIS
Instantly sets an environment variable in the machine or user environment by updating the registry.
.DESCRIPTION
Instantly sets an environment variable in the machine or user environment by updating the registry.
# vcpkg support added to FindwxWidgets.cmake included with CMake 3.17.2
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindwxWidgets
-------------
Find a wxWidgets (a.k.a., wxWindows) installation.
@dpaluy
dpaluy / README.md
Last active September 20, 2024 12:59
Download view only protected PDF from Google Drive

Step by step guide to downloading protected PDF from Google Drive

  1. Open the document in Google Docs
  2. Scroll to the bottom of the document, so all the pages are present
  3. Open Developer Tools on separate window and choose the Console tab
  4. Paste the code
  5. Have fun!
@remojansen
remojansen / class_decorator.ts
Last active September 14, 2023 14:54
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@rvanmil
rvanmil / zcl_bitwise.abap
Last active September 14, 2021 14:15
ABAP bit shifting and bitwise add, subtract, multiply
class ZCL_BITWISE definition
public
final
create public .
public section.
*"* public components of class ZCL_BITWISE
*"* do not include other source files here!!!
class-methods CLASS_CONSTRUCTOR .
@echo off
:: http://weblogs.asp.net/jgalloway/archive/2006/11/20/top-10-dos-batch-tips-yes-dos-batch.aspx
echo %%~1 = %~1
echo %%~f1 = %~f1
echo %%~d1 = %~d1
echo %%~p1 = %~p1
echo %%~n1 = %~n1
echo %%~x1 = %~x1
echo %%~s1 = %~s1
echo %%~a1 = %~a1