Skip to content

Instantly share code, notes, and snippets.

Avatar

Tyler Longren tlongren

View GitHub Profile
@tlongren
tlongren / connections.txt
Last active Sep 11, 2015
DD-WRT All Connections
View connections.txt
tcp 6 117 TIME_WAIT src=192.168.1.9 dst=50.19.209.19 sport=52691 dport=443 src=50.19.209.19 dst=69.66.102.168 sport=443 dport=52691 [ASSURED] use=1 rate=1821 mark=0
udp 17 110 src=192.168.1.10 dst=173.194.115.9 sport=56148 dport=443 src=173.194.115.9 dst=69.66.102.168 sport=443 dport=56148 [ASSURED] use=1 rate=472 mark=0
tcp 6 73 TIME_WAIT src=192.168.1.3 dst=192.168.1.1 sport=39322 dport=80 src=192.168.1.1 dst=192.168.1.3 sport=80 dport=39322 [ASSURED] use=1 rate=468 mark=0
tcp 6 256 ESTABLISHED src=192.168.1.10 dst=52.19.51.179 sport=43811 dport=443 src=52.19.51.179 dst=69.66.102.168 sport=443 dport=43811 [ASSURED] use=1 rate=302 mark=0
udp 17 20 src=192.168.1.126 dst=192.168.1.1 sport=34213 dport=53 src=192.168.1.1 dst=192.168.1.126 sport=53 dport=34213 use=1 rate=51 mark=0
udp 17 8 src=192.168.1.126 dst=192.168.1.1 sport=49128 dport=53 src=192.168.1.1 dst=192.168.1.126 sport=53 dport=49128 use=1 rate=30 mark=0
tcp 6 275 ESTABLISHED src=192.168.1.10 dst=64.233.169.1
@tlongren
tlongren / config.json
Created Jul 20, 2015
sublime-text-3-user-config
View config.json
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_bottom": 3,
"caret_extra_top": 3,
"caret_extra_width": 2,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"font_face": "Source Code Pro",
"font_options":
@tlongren
tlongren / soliloquy-reload-page-on-navigation-click.php
Last active Aug 29, 2015 — forked from n7studios/soliloquy-reload-page-on-navigation-click.php
Soliloquy - Reload Page on Navigation Click and Go to Slider Container
View soliloquy-reload-page-on-navigation-click.php
<?php
/**
* Plugin Name: Soliloquy - Reload Page on Navigation Click and Scroll to Slider Container
* Plugin URI: https://longren.io/soliloquy-reload-page-on-navigation-click-and-scroll-to-slider-container
* Version: 1.0
* Author: Tyler Longren
* Author URI: https://longren.io/
* Description: Reloads the entire Page when the next or previous arrows are clicked, or the pager navigation is used. The correct slide is injected into the URL and scrolls to the slider container.
*
* Based on the original plugin from Tim Carr (http://www.n7studios.co.uk). This simply takes the user to the slider after the page reload, good for sliders at the end of posts/pages.
@tlongren
tlongren / soliloquy-reload-page-on-navigation-click.php
Created Apr 26, 2015
Soliloquy - Reload Page on Navigation Click and Scroll to Slider Container
View soliloquy-reload-page-on-navigation-click.php
<?php
/**
* Plugin Name: Soliloquy - Reload Page on Navigation Click and Scroll to Slider Container
* Plugin URI: https://longren.io/soliloquy-reload-page-on-navigation-click-and-scroll-to-slider-container
* Version: 1.0
* Author: Tyler Longren
* Author URI: https://longren.io/
* Description: Reloads the entire Page when the next or previous arrows are clicked, or the pager navigation is used. The correct slide is injected into the URL and scrolls to the slider container.
*
* Based on the original plugin from Tim Carr (http://www.n7studios.co.uk). This simply takes the user to the slider after the page reload, good for sliders at the end of posts/pages.
@tlongren
tlongren / mysql-health.sh
Last active Aug 29, 2015 — forked from alexalouit/mysql-health.sh
Check And Repair All MySQL Databases on Debian And Ubuntu Linux
View mysql-health.sh
#!/bin/sh
#
# cron ex: 0 0 1 * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /home/tyler/mysql-health.sh >> /home/tyler/mysql-health.log
mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases
@tlongren
tlongren / find-wp-hacks.php
Last active Apr 19, 2016
Find base64 inside PHP files, may indicate a hack, usually involving WordPress
View find-wp-hacks.php
#!/bin/bash
# Script by Kris Chase ( kris@mehh.org )
# http://krischase.com
# Source: http://krischase.com/how-to-find-and-clean-up-infected-wordpress-files-over-ssh/
#
# Modified by Tyler Longren to include ( tyler@longren.io )
# https://longren.io
# Neither of us are responsible for any damage that may occur when running this script.
LIST=infectedfiles.txt
@tlongren
tlongren / Composer.json
Created Mar 29, 2015
Composer.json for WordPress Plugin
View Composer.json
{
"name": "plugin-name/plugin",
"description": "Your plugin description",
"keywords": ["wordpress", "plugin", "private"],
"homepage": "https://longrendev.io/",
"license": "proprietary",
"authors": [
{
"name": "Tyler Longren",
"email": "tyler@longren.io",
View email-confirmation.php
<?php
/**
* Plugin Name: Email Confirmation
* Description: Send an email to the user with confirmation code and store form data in database until user confirms.
* Author: Cedric Ruiz
*/
class EmailConfirmation
{
const PREFIX = 'email-confirmation-';
@tlongren
tlongren / template-portfolio-change-sort.php
Last active Sep 10, 2015
Fixed StanleyWP portfolio grid
View template-portfolio-change-sort.php
<?php
/**
Template Name: Portfolio
*
*
* @file template-portfolio.php
* @package StanleyWP
* @author Brad Williams & Carlos Alvarez
* @copyright 2003 - 2014 Gents Themes
* @license license.txt
View vagrant-output
[tyler:...shotgunsoftware_www/vagrant]$ vagrant up (tweak-announcement✱)
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hansode/centos-5.2-x86_64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 80 => 8080. Now on port 2200.
==> default: Fixed port collision for 22 => 2222. Now on port 2201.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...