Skip to content

Instantly share code, notes, and snippets.

View PabloKowalczyk's full-sized avatar

PabloKowalczyk

  • Poland
View GitHub Profile
#!/bin/sh
# Script based on https://stackoverflow.com/a/51475988 and https://gist.github.com/axiac/3a772c0d20a9f2e77b2165df0ed71e48
PRIMARY_REPO_PATH="$(pwd)";
SECONDARY_REPO="";
SECONDARY_REPO_PATH="/tmp/secondary-repo";
NEW_PATH_SECONDARY_REPO="change/me";
REMOTE_NAME="secondary_repo";
SECONDARY_TEMP_BRANCH="tmp_subdir";
@PabloKowalczyk
PabloKowalczyk / sync-time.bat
Last active June 7, 2019 08:15
Windows sync-time script
echo off
title Time sync batch file
net start w32time
w32tm /resync
net stop w32time
:: pause
exit
@PabloKowalczyk
PabloKowalczyk / .htaccess
Created January 29, 2019 19:07
Symfony on home.pl .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
# Determine the RewriteBase automatically and set it as environment variable.
# If you are using Apache aliases to do mass virtual hosting or installed the
# project in a subdirectory, the base path will be prepended to allow proper
# resolution of the app.php file and to redirect to the correct URI. It will
# work in environments without path prefix as well, providing a safe, one-size
# fits all solution. But as you do not need it in this case, you can comment
# the following 2 lines to eliminate the overhead.
@PabloKowalczyk
PabloKowalczyk / nv-fan-control
Created January 24, 2019 06:23
NVIDIA Fan control script for Linux
#!/bin/bash
nvidia-settings -a "GPUFanControlState=1"
while true
do
gputemp=`nvidia-settings -q GPUCoreTemp |awk -F ":" 'NR==2{print $3}' |sed 's/[^0-9]*//g'`
case "${gputemp}" in