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 | |
/** | |
* Created by PhpStorm. | |
* User: shtrih | |
* Date: 24.09.2017 | |
* Time: 21:57 | |
*/ | |
namespace App\Util; |
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 | |
function getTmp() { | |
// returns file handle, similar to the one returned by fopen, for the new file or false on failure. | |
$handle = tmpfile(); | |
$path = stream_get_meta_data($handle)['uri']; | |
var_dump(fwrite($handle, 'foo')); // 3 | |
var_dump(fread($handle, 42)); // "" | |
var_dump(fgets($handle)); // false | |
var_dump(file_get_contents($path)); // "foo" | |
var_dump(file_exists($path)); // true |
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
find . -type d -exec chmod 0755 {} \; | |
find . -type f -exec chmod 0644 {} \; | |
chown -R baka-user:www-data wp-content/uploads/ | |
chmod -R 0775 wp-content/uploads/ | |
chown baka-user:www-data wp-config.php | |
chmod 0640 wp-config.php |
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
//META{"name":"CollapsibleEmbeds"}*// | |
/* | |
Check for Updates: https://gist.github.com/shtrih/59a8be1f9ff53f0499c2 | |
How to install: | |
1. If you don't have it, get Discord from https://discordapp.com/apps | |
2. Download BetterDiscord for your platform on https://betterdiscord.net/home | |
3. Push the button «Raw» then Ctrl + S. | |
3. Place the plugin in %appdata%\BetterDiscord\plugins\. | |
4. Refresh Discord with Ctrl + Shift + R or just restart Discord completely. | |
5. Go to the BetterDiscord settings → plugins tab and check plugin. |
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
//META{"name":"EmbedAV"}*// | |
/* | |
Check for Updates: https://gist.github.com/shtrih/8a72a36d513ec704c7a9 | |
How to install: | |
1. If you don't have it, get Discord from https://discordapp.com/apps | |
2. Download BetterDiscord for your platform on https://betterdiscord.net/home | |
3. Push the button «Raw» then Ctrl + S. | |
3. Place the plugin in %appdata%\BetterDiscord\plugins\. | |
4. Refresh Discord with Ctrl + Shift + R or just restart Discord completely. |
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
// ==UserScript== | |
// @name Slack Ignore List (19.11.16) | |
// @namespace https://gist.github.com/shtrih/be922d9229925bb52617 | |
// @version 1.4 | |
// @description Add blacklists to channels | |
// @author shtrih | |
// @match https://*.slack.com/messages/*/ | |
// @grant none | |
// ==/UserScript== | |
/* jshint -W097 */ |
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
function FindProxyForURL(url, host) | |
{ | |
url = url.toLowerCase(); | |
host = host.toLowerCase(); | |
// whole site | |
var site_list = [ | |
'local', | |
'lcl', | |
'localhost' |
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
// ==UserScript== | |
// @name Image Full size link | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1 | |
// @description Adds button to get full sized image link | |
// @match http://plus.google.com/* | |
// @match https://plus.google.com/* | |
// @grant unsafeWindow | |
// @grant GM_setClipboard | |
// @copyright 2014+, shtrih |
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 | |
require_once "fnc/inc/ajax.php"; | |
$params = array( | |
'secret', | |
'from', | |
'message', | |
'message_id', | |
'sent_to', |
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 | |
DBUSER= | |
DBPASS= | |
DBHOST=localhost | |
FILEPATH="/home/http/local" | |
DATE=$(date +"%Y-%m-%d-%H_%M") | |
cd ${FILEPATH} |