I hereby claim:
- I am csymlstd on github.
- I am csymlstd (https://keybase.io/csymlstd) on keybase.
- I have a public key ASCVLVT4G9s6_iv9P_-oYjKCvbRnKmpWEHscwQ-Z9V-usgo
To claim this, I am signing this object:
/// twitch-videoad.js | |
const origFetch = window.fetch; | |
window.fetch = (url, init, ...args) => { | |
if (typeof url === "string") { | |
if (url.includes("/access_token")) { | |
url = url.replace("player_type=site", "player_type=thunderdome"); | |
} else if ( | |
url.includes("/gql") && | |
init && | |
typeof init.body === "string" && |
I hereby claim:
To claim this, I am signing this object:
@media print {
a::after {
content: " (" attr(href) ") ";
}
}
<?php | |
add_filter( 'style_loader_src', 'pb_remove_ver_css_js', PHP_INT_MAX - 1 ); | |
add_filter( 'script_loader_src', 'pb_remove_ver_css_js', PHP_INT_MAX - 1 ); | |
function pb_remove_ver_css_js( $src ) { | |
if ( ! $src ) return; | |
if ( strpos( $src, 'ver=' ) ) { | |
$src = remove_query_arg( 'ver', $src ); |
<?php | |
function get_post_count($id = null) { | |
if($id == null) return; | |
$key = 'post_views_count'; | |
$count = get_post_meta($id, $key, true); | |
if($count == '') { | |
$count = 0; | |
delete_post_meta($id, $key); |
sudo systemctl enable image_generation_daemon.timer |
## Drupal's ClamAV default settings should be adjusted to | |
## Daemon mode (over UNIX socket) | |
## /var/run/clamav/clamd.ctl | |
# stop the daemon | |
sudo systemctl stop clamav-freshclam | |
# update definitions | |
sudo freshclam |
<?php | |
// Related to SA-CONTRIB-2018-081 | |
// https://www.drupal.org/node/3036792 | |
function mymodule_jsonapi_asset_filter_access(\Drupal\Core\Entity\EntityTypeInterface $entity_type, \Drupal\Core\Session\AccountInterface $account) { | |
return ([ | |
JSONAPI_FILTER_AMONG_ALL => AccessResult::allowedIfHasPermission($account, 'administer asset entities'), | |
JSONAPI_FILTER_AMONG_PUBLISHED => AccessResult::allowedIfHasPermission($account, 'view published asset entities'), | |
JSONAPI_FILTER_AMONG_OWN => AccessResult::allowedIfHasPermissions($account, ['view published asset entities', 'view published asset entities'], 'AND'), | |
]); |
# End of /etc/sudoers | |
username ALL = NOPASSWD: /var/www/scripts/fix_permissions.sh |
<?php | |
namespace Drupal\content_helper\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
use Drupal\Core\DependencyInjection\ContainerInjectionInterface; | |
use Symfony\Component\HttpKernel\HttpKernelInterface; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\RequestStack; | |
/** | |
* Class SubRequest. | |
* |