$ sudo install -o redis -g redis -d /var/lib/redis2
$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
| Update (2022): https://gist.github.com/atyachin/2f7c6054c4cd6945397165a23623987d | |
| Steps for installing the Android Emulator from EC2 console: | |
| ----------------------------------------------------------- | |
| sudo apt install default-jdk | |
| wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
| unzip sdk-tools-linux-4333796.zip -d android-sdk | |
| sudo mv android-sdk /opt/ | |
| export ANDROID_SDK_ROOT=/opt/android-sdk |
| @echo off | |
| net file 1>nul 2>nul | |
| if "%errorlevel%" == "0" (goto admin) | |
| :elevate | |
| echo strArgs = "" > "%Temp%\elevate.vbs" | |
| for %%f in (%*) do echo strArgs = strArgs ^& ^" ^" ^& Chr^(34^) ^& ^"%%~f^" ^& Chr^(34^) >> "%Temp%\elevate.vbs" | |
| echo strParams = "/c " ^& Chr^(34^) ^& ^"%~s0^" ^& Chr^(34^) >> "%Temp%\elevate.vbs" | |
| echo If strArgs ^<^> ^"^" Then >> "%Temp%\elevate.vbs" | |
| echo strParams = strParams ^& ^" ^" ^& Chr(34) ^& strArgs ^& Chr(34) >> "%Temp%\elevate.vbs" |
| export function magicMethods (clazz) { | |
| // A toggle switch for the __isset method | |
| // Needed to control "prop in instance" inside of getters | |
| let issetEnabled = true | |
| const classHandler = Object.create(null) | |
| // Trap for class instantiation | |
| classHandler.construct = (target, args, receiver) => { | |
| // Wrapped class instance |
| ## | |
| ## How to install mcrypt in php7.2 / php7.3 | |
| ## Linux / MacOS / OSX | |
| ## | |
| ## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ | |
| # |
| import asyncio | |
| import time | |
| def timeit(func): | |
| async def process(func, *args, **params): | |
| if asyncio.iscoroutinefunction(func): | |
| print('this function is a coroutine: {}'.format(func.__name__)) | |
| return await func(*args, **params) | |
| else: |
| ################## | |
| # Privacy Settings | |
| ################## | |
| # Privacy: Let apps use my advertising ID: Disable | |
| Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
| # To Restore: | |
| #Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 | |
| # Privacy: SmartScreen Filter for Store Apps: Disable | |
| Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0 |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: dockercompose | |
| # Required-Start: $docker | |
| # Required-Stop: $docker | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Docker Services | |
| ### END INIT INFO |