Skip to content

Instantly share code, notes, and snippets.

Avatar
🍜
Ramen connoisseur

Jess Green jesgs

🍜
Ramen connoisseur
View GitHub Profile
@lizthegrey
lizthegrey / attributes.rb
Last active Aug 7, 2020
Hardening SSH with 2fa
View attributes.rb
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
Created Apr 17, 2018
Laravel MailHog SMTP configuration
View MailHog configuration
# Mailhog
MAIL_DRIVER=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 Jan 30, 2018
Install MailHog with MAMP Pro
View mailhog-mamp.md

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 Sep 23, 2017
Catch var_dump(), die() or dd() with PHP CodeSniffer, as well as enforcing PSR2 and various comment standards
View phpcs.xml
<?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 Sep 29, 2018
MySQL 5.7 Travis CI configuration
View .travis.yml
language: php
php:
- 7.0
- 7.1
services:
- mysql
addons:
@ThatGerber
ThatGerber / config
Last active Feb 13, 2018
SSH Config
View 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 Jul 13, 2020
FIX warning: ignoring broken ref refs/remotes/origin/HEAD
View gist:cbde168d26bc5faf9bf9fef648091b42

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


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

@dpschen
dpschen / font-smoothing-on-high-dpi-media.css
Last active Dec 7, 2019 — forked from marcedwards/high-dpi-media.css
Use more beautiful font smoothing on high dpi media devices
View font-smoothing-on-high-dpi-media.css
/* ---------------------------------------------------------- */
/* */
/* 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 */
@nrollr
nrollr / Redis.sh
Created Mar 29, 2016
Install Redis via Homebrew
View Redis.sh
#!/bin/bash
brew install redis # Install Redis using Homebrew
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents # Enable Redis autostart
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist # Start Redis server via launchctl
# homebrew.mxcl.redis.plist contains reference to redis.conf file location: /usr/local/etc/redis.conf
redis-server /usr/local/etc/redis.conf # Start Redis server using configuration file, Ctrl+C to stop
redis-cli ping # Check if the Redis server is running
@crx4
crx4 / regex_replace.sql
Created Mar 19, 2016
mysql regex replace function
View regex_replace.sql
DELIMITER $$
CREATE FUNCTION `regex_replace`(pattern VARCHAR(1000),replacement VARCHAR(1000),original VARCHAR(1000))
RETURNS VARCHAR(1000)
DETERMINISTIC
BEGIN
DECLARE temp VARCHAR(1000);
DECLARE ch VARCHAR(1);
DECLARE i INT;
SET i = 1;
You can’t perform that action at this time.