Skip to content

Instantly share code, notes, and snippets.

View ahoseinian's full-sized avatar
🏠
Working from home

Amir Hoseinian ahoseinian

🏠
Working from home
View GitHub Profile
<html>
<head>
<style type="text/css">
body {
font-family: arial;
background-color: black;
}
.container {
margin: 20px;
@ahoseinian
ahoseinian / array flatten
Created January 24, 2017 05:58
Array Flatten
const flatten = arr => arr.reduce(
(a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), []
)
flatten([[1,2,[3]],4])
@ahoseinian
ahoseinian / securify.php
Created August 3, 2012 11:54
securify usage
<?php
require_once("Securify.php");
$str = "php password";
$securify = new Securify;
$securedString = $securify($str,100);//second param is lvl of securifieng (1-100) in other word it`s the chance that words of the string change to something else
echo $securedString; // somthing like "P#p P@$$\/\/0Rd" , "P#p PA$sW0R|)" or in lower lvls "Php Pas$woRd"
@ahoseinian
ahoseinian / Usage.php
Created July 24, 2012 18:12
imageSaver
<?php
$imageSaver->setImage($_FILES['image'])->setName('test')->setPath("\images\\")->resize('auto',300)->save();