Skip to content

Instantly share code, notes, and snippets.

Adapted from: https://www.joshcurry.co.uk/posts/ssh-create-a-tunnel-only-user-for-reverse-tunnels
sudo useradd -m tun-user
sudo nano /etc/ssh/sshd_config
Match User tun-user
AllowAgentForwarding no
PasswordAuthentication no
X11Forwarding no
@EarthlingDavey
EarthlingDavey / class-comments.php
Created January 30, 2020 15:27 — forked from mattclements/function.php
Wordpress Disable Comments (add to function.php)
<?php
/**
* Class Comments.
* Code refactored from:
* https://gist.github.com/mattclements/eab5ef656b2f946c4bfb
*
* @package Foo
*/
namespace Boop;
@EarthlingDavey
EarthlingDavey / admin.js
Last active December 18, 2019 10:20
Word limit for ACF text input field
// This is a function to limit word count on ACF fields
// Add cu-helper__max-words-3 to the field class for a limit of 3 words
var maxWordHelperClass = 'cu-helper__max-words-';
$('#editor').on('keydown', '.acf-field[class*="' + maxWordHelperClass + '"] input', function (e) {
var maxWords = 0;
var $input = $(this);
if ($input.attr('data-max-words')) {
var maxWords = $input.attr('data-max-words');
@EarthlingDavey
EarthlingDavey / app.js
Last active December 18, 2019 14:27
example of making flickity slider more adaptive.
$sliderElement = $('.variation-slider');
var sliderOptions = {
cellSelector: '.variation-slide',
freeScroll: true,
pageDots: false,
imagesLoaded: true,
percentPosition: false,
wrapAround: true
};

Keybase proof

I hereby claim:

  • I am daveybrown on github.
  • I am davey1211 (https://keybase.io/davey1211) on keybase.
  • I have a public key ASCH6FriOi9EflppLOFGqoHIWye1o-Rg_dcydgwSR3rhDAo

To claim this, I am signing this object: