This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Model: Expense.php | |
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Expense extends Model | |
{ | |
protected $fillable = [ | |
'source_id', 'expense_category_id', 'quantity', 'note' | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Programmer's day on Friday 13 average years - JSON Voorhees | |
$r=$i=0; | |
for ($y=$ly=0; $y<3000; $y++) { | |
$d = new DateTime(); | |
$d->setDate($y, 1, 256); | |
if ($d->format("D") == "Fri" && $d->format('d') == 13) { | |
$r += $y - $ly; | |
$ly = $y; | |
$i++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Replacing display metadata in bulk for ICC files, from mntrRGB to scnrRGB - Mr.Jack | |
*/ | |
$read_folder = "./files/"; | |
$write_folder = "./final/"; | |
$scanned_directory = array_diff(scandir($read_folder), array('..', '.')); | |
foreach($scanned_directory as $file){ | |
echo "<p>Converting ".$file." - "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Red Neuronal 3x12x8x2 - Mr.Jack - 10/2017 | |
3 neuronas de entrada | |
2 capas intermedias | |
12 neuronas escondidas en la capa 1 | |
8 neuronas escondidas en la capa 2 | |
2 neuronas de salida | |
*/ | |
class RedNeuronal{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-UACBypass { | |
<# | |
.SYNOPSIS | |
Bypasses UAC on Windows 10 by abusing the SilentCleanup task to win a race condition, allowing for a DLL hijack without a privileged file copy. | |
Author: Matthew Graeber (@mattifestation), Matt Nelson (@enigma0x3) | |
License: BSD 3-Clause | |
Required Dependencies: None | |
Optional Dependencies: None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="UTF-8"> | |
<h1>Algoritmo evolutivo sencillo en PHP - Mr.Jack</h1><hr/> | |
<?php | |
$objetivo = array(1,2,3,4,5); | |
$poblacion = array(); | |
function generar_poblacion( $individuo_base = null ){ | |
global $poblacion; | |
if(empty($individuo_base)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre id="test"></pre> | |
<script> | |
/* | |
Password validation with regex by Mr.Jack (github.com/ikarius6) | |
At least 1 capital | |
At least 1 number | |
Minimum length of 8 characters | |
Demo: https://jsfiddle.net/h5sutweh/ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Getting GIFs of pokemons by Jack | |
*/ | |
set_time_limit( 0 ); | |
$dwl_folder = "./img"; //edit this | |
$p1 = get("http://es.pokemon.wikia.com/wiki/Lista_de_Pok%C3%A9mon_de_la_primera_generaci%C3%B3n"); | |
preg_match_all('/<table class="tabpokemon sortable mergetable" style="text-align:center; width:100%;">(?<trs>.*?)<\/table>/si', $p1['response'], $matches); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/* | |
Where can I walk step by step? - by Jack | |
0 = can walk | |
1 = a wall | |
Other numbers > padding = steps | |
*/ | |
var map = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
OAuthSimple by jr conlin | |
http://unitedHeroes.net/OAuthSimple | |
Refactor to PHP by MrJack.org | |
*/ | |
class OAuthSimple | |
{ | |
private $_secrets=[]; | |
private $_default_signature_method= "HMAC-SHA1"; |
NewerOlder