Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Detect if the current user has concurrent sessions
*
* @return bool
*/
function pcl_user_has_concurrent_sessions() {
return ( is_user_logged_in() && count( wp_get_all_sessions() ) > 1 );
}
@bissquitt
bissquitt / NightbotSubscriptions.md
Created September 3, 2021 20:18 — forked from Decicus/NightbotSubscriptions.md
Nightbot subscriptions - List of known channels that Nightbot has a subscription to on Twitch

Nightbot subscriptions (Twitch)

This is a list of users Nightbot should be subscribed to on Twitch. Keep in mind this list is (probably) incomplete, but can also become invalid at any time.

Adding a new channel subscription:

Keep in mind if you wish to have a specific channel subscribed to Nightbot, the channel owner has to email Twitch support to request this. This is currently only possible for Twitch partners and not affiliates.

  • For Twitch partners - Read this article for more information.

Suggestions

@bissquitt
bissquitt / markdown-text-101.md
Created September 3, 2021 20:18 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@bissquitt
bissquitt / README.md
Created September 3, 2021 20:18 — forked from smiley/README.md
How to make an automatic "stream's live" notification for your Discord server

Making an automatic Twitch -> Discord notification (using IFTTT)

So you went live and you want everyone to know. Here's how you do it:

Part 1 - Register on IFTTT

Go to https://ifttt.com/ and create an account (if you don't already have one)

Part 2 - Make a Discord Webhook

  • Find the Discord channel in which you would like to send Tweets.
  • In the settings for that channel, find the Webhooks option and create a new webhook. Note: This URL should be kept private. It allows anyone to write messages to that specific channel using that specific URL. Keep it safe!
@bissquitt
bissquitt / html5-email-validation.htm
Created September 3, 2021 20:18 — forked from chuckreynolds/html5-email-validation.htm
HTML5 Input Email Validation
<input type="text" title="email" required pattern="[^@]+@[^@]+.[a-zA-Z]{2,6}" />
@bissquitt
bissquitt / common-terminal-commands.md
Created September 3, 2021 20:17 — forked from chuckreynolds/common-terminal-commands.md
Common linux / terminal commands I always use but forget. So fuck it I'm saving em here

common terminal commands

ubuntu updates & clean

  • sudo apt update && sudo apt upgrade -y
  • sudo apt autoremove && sudo apt clean

copy mac public ssh key

  • pbcopy < ~/.ssh/id_rsa.pub

edit host file and flush dns after