Skip to content

Instantly share code, notes, and snippets.

View jstnbr's full-sized avatar

Justin Breen jstnbr

View GitHub Profile
@diversen
diversen / wordpress-backup-from-web.php
Last active April 4, 2022 12:42
Wordpress backup if you don't have SSH access but you can use mysqldump and tar
<?php
// Read database configuration
include_once "wp-config.php";
// Default database
// $database = $databases['default']['default'];
$database['host'] = DB_HOST;
$database['user'] = DB_USER;
$database['pass'] = DB_PASSWORD;
@ZachBray
ZachBray / install_ngrok.sh
Created August 12, 2018 09:47
ngrok install
#!/bin/bash
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
rm ngrok-stable-linux-amd64.zip
sudo mv ngrok /usr/bin/
@blantonious
blantonious / Unbuntu1604-LEMP.sh
Last active January 1, 2021 11:13
Configuration script to prep and install Laravel 5.6 on Ubuntu 16.04
#!/bin/bash
# /*=================================
# = VARIABLES =
# =================================*/
WELCOME_MESSAGE='
____ ____ ____ ____ ____
||N ||||G ||||I ||||N ||||X ||
||__||||__||||__||||__||||__||
@hteumeuleu
hteumeuleu / gmail-animation.html
Created April 26, 2018 13:49
The new Gmail loading animation is just HTML and CSS.
<style>
body{margin:0;width:100%;height:100%} body,td,input,textarea,select{font-family:arial,sans-serif} input,textarea,select{font-size:100%} #loading{position:absolute;width:100%;height:100%;z-index:1000;background-color:#fff} .msg{ color: #757575; font: 20px/20px Arial, sans-serif; letter-spacing: .2px; text-align: center } #nlpt{ animation: a-s .5s 2.5s 1 forwards; background-color: #f1f1f1; height: 4px; margin: 56px auto 20px; opacity: 0; overflow: hidden; position: relative; width: 300px } #nlpt::before{ animation: a-lb 20s 3s linear forwards; background-color: #db4437; content: ''; display: block; height: 100%; position: absolute; transform: translateX(-300px); width: 100% } @keyframes a-lb{ 0%{transform:translateX(-300px)}5%{transform:translateX(-240px)}15%{transform:translateX(-30px)}25%{transform:translateX(-30px)}30%{transform:translateX(-20px)}45%{transform:translateX(-20px)}50%{transform:translateX(-15px)}65%{transform:translateX(-15px)}70%{transform:translateX(-10px)}95%{transform:translateX(-1
@thuijssoon
thuijssoon / disableBodyScroll.js
Last active November 2, 2023 18:55
iOS disable body scroll
/**
* Prevent body scroll and overscroll.
* Tested on mac, iOS chrome / Safari, Android Chrome.
*
* Based on: https://benfrain.com/preventing-body-scroll-for-modals-in-ios/
* https://stackoverflow.com/a/41601290
*
* Use in combination with:
* html, body {overflow: hidden;}
*
@mburakerman
mburakerman / plugin.js
Last active July 28, 2023 07:07
The simplest vanilla js plugin template
// <div id="box">Lorem</div>
// Our goal is to make text color red
var Makered = function(selector) {
this.el = document.querySelector(selector); // for multiple elements use querySelectorAll
}
Makered.prototype.makered=function() {
this.el.style.color="red";
}
@daggerhart
daggerhart / wp-get-taxonomy-hierarchy.php
Last active December 18, 2022 03:22
WordPress function to get a complete taxonomy hierarchy of terms in PHP
<?php
/**
* Recursively get taxonomy and its children
*
* @param string $taxonomy
* @param int $parent - parent term id
* @return array
*/
function get_taxonomy_hierarchy( $taxonomy, $parent = 0 ) {
@rniswonger
rniswonger / wp-disable-plugin-update.php
Last active January 3, 2024 15:21
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}
@esamattis
esamattis / .gitignore
Created September 7, 2016 10:42 — forked from salcode/.gitignore
.gitignore file for WordPress - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@webarthur
webarthur / pure-slidedown-slideup.css
Last active December 18, 2023 07:47
Pure CSS slidedown / slideup animation using transform translateY
.slide-up, .slide-down {
overflow:hidden;
}
.slide-up > div, .slide-down > div {
transform: translateY(-100%);
transition: .4s ease-in-out;
}
.slide-down > div {
transform: translateY(0);
}