Skip to content

Instantly share code, notes, and snippets.

@sethta
sethta / _mixins.scss
Last active May 20, 2019 21:59
Sass Mixins
// `@include @clearfix()` will add a clearfix to the CSS
@mixin clearfix {
&:after {
display: table;
clear: both;
content: '';
}
}
// `@include font-size(18)` will add both a 18rem font size and a 18px fallback
@sethta
sethta / _media-queries.scss
Created February 14, 2019 04:52
Mobile-First Media Queries
// HOW TO USE BREAKPOINT VARIABLES
// `@media #{$desktop} {
// CSS: GOES HERE;
// }`
// Breakpoints (we use pixels so we can still have mobile-last queries)
$tiny-phone-bp: 320px;
$phone-bp: 780px;
$tablet-bp: 900px;
$desktop-bp: 1200px;
@sethta
sethta / backupbuddy-stash-fix.php
Last active January 6, 2017 17:31
WordPress mu-plugin to check if Stash has been stuck at Error #5002 for more than 24 hours, and then deletes catalog and state
<?php
/*
* Plugin Name: Backupbuddy Stash Fix
* Description: Deletes catalog and state if error #5002 has occurred
* Version: 1.0
* Author: Seth Alling
* Author URI: https://sethalling.com
* Requires at least: 4.7
* Tested up to: 4.7
*/
@sethta
sethta / 0_reuse_code.js
Created October 5, 2016 04:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sethta
sethta / fix-get-cpanel-users.sh
Last active March 4, 2016 19:35
Hacked Site Cleanup Scripts
#!/bin/bash
# Run as root
# You may want to modify the cpanelusers file after
for i in $(/bin/ls /var/cpanel/users/); do echo ${i} >> /fix-hack/cpanelusers; done
# Increase file permissions
chmod 400 /fix-hack/cpanelusers
@sethta
sethta / .bash_profile
Last active November 1, 2015 03:46
Command Line Deployment
# Git Aliases
alias gi='git init'
alias gs='git status'
alias ga='git add -A'
alias gc='git commit . -m'
alias gpull='git pull origin master'
alias gpush='git push origin master'
alias gt='git tag'
alias gtag='git push --tags'