Skip to content

Instantly share code, notes, and snippets.

View jakeydevs's full-sized avatar
🎯
Focusing

Jake Price jakeydevs

🎯
Focusing
View GitHub Profile
@jakeydevs
jakeydevs / login.php
Created June 26, 2014 12:32
Redirect to URL location with input (Laravel)
<?php
//-- Other working code above
if (Auth::attempt(array('username' => $username, 'password' => $password))) {
return Redirect::intended('workspaces/');
} else {
//-- Failed Auth
Session::flash('message', 'Username and/or password incorrect');
return Redirect::to('login')->withInput(Input::except('password'));
@jakeydevs
jakeydevs / .htaccess
Created July 10, 2014 09:06
Basic email detection from images
RewriteRule ^images/email/([a-zA-Z0-9_-]*)/images.gif$ email_detect.php?string=$1 [L,NC,QSA]
<?PHP
$table->increments('id');
$table->string('product');
$table->string('type'); //-- Video type
$table->string('data'); //-- Datas
$table->timestamps();
public function decideAdvert()
{
@jakeydevs
jakeydevs / prettyPassword.js
Created July 15, 2015 08:58
Javascript Pretty Passwords
//-- prettyPassword.js
window.prettyPassword = {
//-- Password Vars
pass: "",
sep: "",
//-- generate
generate: function() {
@jakeydevs
jakeydevs / keybase.md
Created November 19, 2015 10:00
keybase verification

Keybase proof

I hereby claim:

  • I am JakePrice86 on github.
  • I am jakeprice (https://keybase.io/jakeprice) on keybase.
  • I have a public key whose fingerprint is 3217 3166 40A7 A771 9146 9DDC 23A3 31FB C95D A993

To claim this, I am signing this object:

@jakeydevs
jakeydevs / test.php
Last active April 16, 2016 17:53
Run every X seconds
<?PHP
//-- Run at least every 5 seconds
$diff = 5;
//-- Get my time
$time_check = 0;
//-- Always run
while (1) {
@jakeydevs
jakeydevs / dup.bash
Created August 2, 2016 14:44
Duplicates a 1 page PDF file 10 times
#!/bin/bash
for i in {2..10}
do
./pdftk 1.pdf $i.pdf cat output $(($i+1)).pdf
rm $i.pdf
done
<div>
<iframe src="link-to-embed" style="width:100%;min-height:700px" seamless="seamless"></iframe>
</div>
11110100110011101000100
1100111000010101011111000
11010110010010011110100
1111010011011100001001
1100011010000111110101010
1100111010011110010101011
1010100000111110000010011
@jakeydevs
jakeydevs / update.sh
Last active November 21, 2018 05:27
Update script to turn PHP 7.0 to 7.2 - blog post explaning at wildrocket.io/
#! /bin/bash
# Please only run IF YOU ARE SURE YOU SHOULD!
#
# This script will remove PHP and attempt to install the latest
# "Stable" version! To help me with LARAVEL installations, it'll
# also install composer and turn on mod_rewrite as well if it cannot
# be sure it is installed
#
# @author @JakeLPrice