This file contains hidden or 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
#!/bin/bash | |
while : | |
do | |
echo "Press [CTRL+C] to stop..." | |
URL=$(cat /dev/urandom | env LC_CTYPE=C tr -dc a-zA-Z0-9 | head -c 16; echo) | |
for i in {1..100} | |
do | |
curl https://goldenliine.pl/?s=$URL --max-time 2 -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36" &> /dev/null & | |
curl https://goldenliine.pl/movies/$URL --max-time 2 -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36" &> /dev/null & |
This file contains hidden or 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
#!/bin/sh | |
rm -rfv "$HOME/.vscode" | |
rm -rfv "$HOME/Library/Application Support/Code" | |
rm -rfv "$HOME/Library/Caches/com.microsoft.VSCode" | |
rm -rfv "$HOME/Library/Saved Application State/com.microsoft.VSCode.savedState" | |
# Thanks goes to offby1 from stackoverflow! |
This file contains hidden or 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
section: screens | |
Fabryka: | |
halfDuplexCapsLock = false | |
halfDuplexNumLock = false | |
halfDuplexScrollLock = false | |
xtestIsXineramaUnaware = false | |
switchCorners = none | |
switchCornerSize = 0 | |
Konrads-MacBook-Pro.local: | |
halfDuplexCapsLock = false |
This file contains hidden or 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
<?php | |
/** | |
* WordPress opcache preloading. | |
* Requires PHP >= 7.4. | |
* | |
* @author Konrad Fedorczyk <[email protected]> | |
* @link https://stitcher.io/blog/preloading-in-php-74 | |
* | |
* @version 1.0.0 | |
*/ |
This file contains hidden or 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
<?php | |
$showDate = "2019-07-16 20:00:00.0"; | |
$hideDate = "2019-07-22 20:00:00.0"; | |
$timezone = new DateTimeZone('Europe/Warsaw'); | |
$now = new DateTime(); | |
$now->setTimezone($timezone); | |
// If in timeframe | |
if( $now > new DateTime($showDate, $timezone) && $now < new DateTime($hideDate, $timezone) ) { | |
do_something(); |
This file contains hidden or 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
#!/bin/sh | |
# Extract JSON value | |
parse_json () { | |
echo $1 | \ | |
sed -e 's/[{}]/''/g' | \ | |
sed -e 's/", "/'\",\"'/g' | \ | |
sed -e 's/" ,"/'\",\"'/g' | \ | |
sed -e 's/" , "/'\",\"'/g' | \ | |
sed -e 's/","/'\"---SEPERATOR---\"'/g' | \ |
This file contains hidden or 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
<?php | |
/* | |
* Template Name: Szablon testowy | |
*/ | |
// taka prościzna do mierzenia czasu wykonania | |
function timeTook($start, $task = '') { | |
$execution_time = round( (microtime(true) - $start), 2); | |
return '<h4>Zadanie: <em>' . $task . '</em> zajęło: ' . $execution_time . ' sekund(y)</h4>'; | |
} |
This file contains hidden or 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
#!/bin/sh | |
# Extract JSON value | |
parse_json () { | |
echo $1 | \ | |
sed -e 's/[{}]/''/g' | \ | |
sed -e 's/", "/'\",\"'/g' | \ | |
sed -e 's/" ,"/'\",\"'/g' | \ | |
sed -e 's/" , "/'\",\"'/g' | \ | |
sed -e 's/","/'\"---SEPERATOR---\"'/g' | \ |
This file contains hidden or 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
<?php | |
/** | |
* Extension of base controller. | |
* Add additional controller functions and vars here. | |
*/ | |
namespace app\components; | |
use Yii; |