Skip to content

Instantly share code, notes, and snippets.

Payam Naderi E1101

Block or report user

Report or block E1101

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View eav.explain.txt
CREATE TABLE order_info(
order_id INT NOT NULL,
product_id INT NOT NULL,
option_attribute VARCHAR(20),
option_value VARCHAR(20),
PRIMARY KEY(order_id,product_id,option_attribute,option_value)
);
INSERT INTO order_info VALUES
(1,10,'Colour','Red'),(1,10,'Size','Large'),(1,10,'Sleeve','Short'),
(2,10,'Colour','Blue'),(2,10,'Size','Small'),(2,10,'Sleeve','Long');
View reverseArrayWords.php
<?php
/**
* Reverse Words In Array Of Charachters
*
* @param array $input
*
* @return array
*/
function reverseWords(array $input) : array
{
@E1101
E1101 / usage.sh
Created Nov 18, 2018
Linux Resources Usage
View usage.sh
####################################################################################################
# Usage.sh #
# Written by Ali Hallaji #
# If any bug, report me in my Github page at below #
# Free to use/edit/distribute the code below by #
# giving proper credit to Author #
# Link: https://github.com/ali-hallaji/system-usage-bash #
####################################################################################################
#! /bin/bash
# unset any variable which system may be using
@E1101
E1101 / resume.php
Created Feb 28, 2018
Resume Upload
View resume.php
<?php
$CHUNK = 8192;
try {
if (!($putData = fopen("php://input", "r")))
throw new Exception("Can't get PUT data.");
// now the params can be used like any other variable
// see below after input has finished
@E1101
E1101 / nth_prime.php
Created Dec 17, 2017
Get A Number In Prime Series By Index; The nTH Prime.
View nth_prime.php
<?php
function getPrimingSeriesIndex($index)
{
if ( $index <= 0 )
return false;
if ($index == 1)
return 2;
View postfile.php
<?php
public function postFile()
{
$file_url = "test.txt"; //here is the file route, in this case is on same directory but you can set URL too like "http://examplewebsite.com/test.txt"
$eol = "\r\n"; //default line-break for mime type
$BOUNDARY = md5(time()); //random boundaryid, is a separator for each param on my post curl function
$BODY=""; //init my curl body
$BODY.= '--'.$BOUNDARY. $eol; //start param header
$BODY .= 'Content-Disposition: form-data; name="sometext"' . $eol . $eol; // last Content with 2 $eol, in this case is only 1 content.
$BODY .= "Some Data" . $eol;//param data in this case is a simple post data and 1 $eol for the end of the data
@E1101
E1101 / parse_token.php
Created Oct 4, 2017
Parse Token From Request
View parse_token.php
<?php
/**
* As per the Bearer spec (draft 8, section 2) - there are three ways for a client
* to specify the bearer token, in order of preference: Authorization Header,
* POST and GET.
*
* @param ServerRequestInterface $request
*
* @return null|string Token
*/
@E1101
E1101 / curl_client.php
Created Jul 26, 2017
Curl Http Client
View curl_client.php
<?php
class Client
{
public function get($url, array $options = [])
{
$options = array_merge([ 'method' => 'get', 'url' => $url ], $options);
return $this->request($options);
}
public function post($url, array $data = [], array $options = [])
@E1101
E1101 / spam_list.txt
Created Jul 26, 2017
List Of SPAM Mail Server providers
View spam_list.txt
0815.ru
0815.ru0clickemail.com
0815.ry
0815.su
0845.ru
0clickemail.com
0-mail.com
0wnd.net
0wnd.org
10mail.com
View PHP7-extensions.md

Extensions Catalog

This page holds everything we know about every extension we know about. Instructions for working with this page can be found on our main website.

If this page is annoyingly narrow to read, try this: https://github.com/xthexder/wide-github

Core Extensions

Name Homepage/location Has maintainers Has tests Has docs Works on PHP5 Works on PHP7 Is good on PHP 7 Details
You can’t perform that action at this time.