Skip to content

Instantly share code, notes, and snippets.

View denblackstache's full-sized avatar

Denis Semenenko denblackstache

View GitHub Profile
@denblackstache
denblackstache / turbo-boost-switcher-launch.md
Last active September 10, 2023 09:23
Turbo Boost Switcher Launch Daemon.md
@denblackstache
denblackstache / index.gs
Created January 9, 2023 12:53
NBG Fetch Currency AppScript
/**
* Fetch currency rate from
* @see https://nbg.gov.ge/en/monetary-policy/currency
* @param date Date
* @param currency USD, EUR or GBP
*/
function fetchGelCurrencyRate(date, currency) {
Logger.log(`fetchGelCurrencyRate with date: ${date}, currency: ${currency}`);
const toISODateString = date => `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}`;
const url = `https://nbg.gov.ge/gw/api/ct/monetarypolicy/currencies/en/json/?currencies=${currency.toUpperCase()}&date=${toISODateString(date)}`;
@denblackstache
denblackstache / apply-git-config.sh
Last active December 12, 2022 10:35
Apply Git config to all directories in root directory
#!/bin/bash
set -euo pipefail
user_name="Denis S"
user_email="my@example.com"
ssh_command="ssh -i ~/.ssh/custom_key"
repo_container_path="/Users/den/repos"
configure_git_repo() {
custom_root_path=$1
@denblackstache
denblackstache / stunnel.conf
Created July 15, 2016 10:28
Example config for CryptoPro Stunnel
; Protocol version (all, SSLv2, SSLv3, TLSv1)
; sslVersion = TLSv1
; Some security enhancements for UNIX systems - comment them out on Win32
;chroot = /opt/cprocsp/var/lib/stunnel/
setuid = root
setgid = root
; PID is created inside chroot jail
pid = /var/opt/cprocsp/tmp/stunnel_cli.pid
@denblackstache
denblackstache / steam_idle.bat
Last active April 28, 2016 07:13
Steam idling without Installing the game
@echo off
set /p steamappid=Enter Steam App ID:
echo %steamappid% > steam_appid.txt
echo running steam app id %steamappid%
C:\\Python27\\python.exe -c "import time; import ctypes; s=ctypes.CDLL('steam_api.dll'); s.SteamAPI_Init(); time.sleep(9999);"
@denblackstache
denblackstache / itunes_silent.ps1
Created February 22, 2015 22:39
iTunes Silent Installer | Without Bloatware
# Set-ExecutionPolicy to RemoteSigned to start this script
# Checking out the 7z
if (-not (test-path "C:\Program Files\7-Zip\7z.exe")) {throw "C:\Program Files\7-Zip\7z.exe needed"}
set-alias sz "C:\Program Files\7-Zip\7z.exe"
$source = "./iTunes64Setup.exe"
$dest = "./iTunes64Setup"
# Unpack Bloatware
@denblackstache
denblackstache / remote_file_exists.php
Last active August 29, 2015 14:14
php | check remote file exists
<?php
function remoteFileExists($fileUrl, $eTag = false)
{
$fileHeaders = get_headers($fileUrl, 1);
if (substr($fileHeaders[0], 9, 3) === '200') {
$exists = true;
if ($eTag) {