Skip to content

Instantly share code, notes, and snippets.

View jesgs's full-sized avatar
🍜
Ramen connoisseur

Jess Green jesgs

🍜
Ramen connoisseur
View GitHub Profile
<?php
namespace EPH\DAEmbed;
function register_providers() {
$callback = __NAMESPACE__ . '\handle_deviantart';
wp_embed_register_handler( 'deviantart-main', '#https://www.deviantart.com/*+#', $callback, 10 );
// Include other handlers as needed
}
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@Propaganistas
Propaganistas / MailHog configuration
Last active March 13, 2024 14:26
Laravel MailHog SMTP configuration
# Mailhog
MAIL_MAILER=smtp
MAIL_HOST=0.0.0.0
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
@jaredatch
jaredatch / mailhog-mamp.md
Created January 30, 2018 21:57
Install MailHog with MAMP Pro

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
@matthewbdaly
matthewbdaly / phpcs.xml
Created September 23, 2017 12:53
Catch var_dump(), die() or dd() with PHP CodeSniffer, as well as enforcing PSR2 and various comment standards
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>Coding standard for a Laravel app.</description>
<file>app</file>
<file>tests</file>
<exclude-pattern>*/migrations/*</exclude-pattern>
@gocanto
gocanto / .travis.yml
Last active September 29, 2018 08:06
MySQL 5.7 Travis CI configuration
language: php
php:
- 7.0
- 7.1
services:
- mysql
addons:
@chriswgerber
chriswgerber / config
Last active February 13, 2018 13:36
SSH Config
Host bitbucket.org
ControlMaster no
Host *
Compression yes
ControlMaster auto
ControlPath /tmp/ssh-conn-%r@%h:%p.con
ControlPersist 30
ForwardAgent yes
ServerAliveInterval 100
IdentityFile ~/.ssh/id_rsa
@libitte
libitte / gist:cbde168d26bc5faf9bf9fef648091b42
Last active November 11, 2022 19:30
FIX warning: ignoring broken ref refs/remotes/origin/HEAD

warning: ignoring broken ref refs/remotes/origin/HEAD


➜   ✗ g symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/develop
➜   ✗ g fetch --prune
➜   ✗ g gc

@anandanand84
anandanand84 / scale-canvas.js
Created March 24, 2017 02:51 — forked from callumlocke/scale-canvas.ts
Function to fix a canvas so it will look good on retina/hi-DPI screens.
/**
* This function takes a canvas, context, width and height. It scales both the
* canvas and the context in such a way that everything you draw will be as
* sharp as possible for the device.
*
* It doesn't return anything, it just modifies whatever canvas and context you
* pass in.
*
* Adapted from Paul Lewis's code here:
* http://www.html5rocks.com/en/tutorials/canvas/hidpi/
@dpschen
dpschen / font-smoothing-on-high-dpi-media.css
Last active December 7, 2019 11:29 — forked from marcedwards/high-dpi-media.css
Use more beautiful font smoothing on high dpi media devices
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */