Skip to content

Instantly share code, notes, and snippets.

View phpcodertop's full-sized avatar
🏠
Available for remote work

Ahmed Maher Halima phpcodertop

🏠
Available for remote work
View GitHub Profile
@phpcodertop
phpcodertop / _ide_helper.php
Created April 28, 2017 21:33 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.4.11 on 2017-02-14.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
Windows Registry Editor Version 5.00
; Open files
; Default Git-Bash Location C:\Program Files\Git\git-bash.exe
[HKEY_CLASSES_ROOT\*\shell\Open Git Bash]
@="Open Git Bash"
"Icon"="C:\\Program Files\\Git\\git-bash.exe"
[HKEY_CLASSES_ROOT\*\shell\Open Git Bash\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%1\""
@phpcodertop
phpcodertop / gist:9519f0b722b5fba5074a86d32b17e5e2
Created February 4, 2018 00:56 — forked from pwlin/gist:1248250
php custom encrypt/decrypt
<?php
function encrypt($string, $key=5) {
$result = '';
for($i=0, $k= strlen($string); $i<$k; $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
$char = chr(ord($char)+ord($keychar));
$result .= $char;
}
return base64_encode($result);
@phpcodertop
phpcodertop / item-item-collaborative-filtering.php
Last active February 24, 2018 06:31
Item-item collaborative filtering
<?php
// code by Mahmoud Gamal
function similarity($str1, $str2)
{
$str2 = strtoupper($str2);
$str1 = strtoupper($str1);
$len1 = strlen($str1);
$len2 = strlen($str2);
$max = max($len1, $len2);
@phpcodertop
phpcodertop / script.sh
Created April 14, 2018 22:44
install ipvtl trial and hack its trial
#!/bin/bash
echo "Downloading ipvtl Software \n"
cd /home
wget http://www.ipvideotrans.com/download/ipvtl_trial-x64.tar.xz
This file has been truncated, but you can view the full file.
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=93)}([function(e,t,n){"use strict";function i(e){function t(){l.add(e,"ps--focus")}function n(){l.remove(e,"ps--focus")}var i=this;i.settings=a.clone(c),i.containerWidth=null,i.containerHeight=null,i.contentWidth=null,i.contentHeight=null,i.isRtl="rtl"===u.css(e,"direction"),i.isNegativeScroll=function(){var t=e.scrollLeft,n=null;return e.scrollLeft=-1,n=e.scrollLeft<0,e.scrollLeft=t,n}(),i.negativeScrollAdjustment=i.isNegativeScroll?e.scrollWidth-e.clientWidth:0,i.event=new d,i.ownerDocument=e.ownerDocument||document,i.scrollbarXRail=u
@phpcodertop
phpcodertop / analytics.conf
Created July 7, 2018 19:55 — forked from jirutka/analytics.conf
Add Google Analytics tracking code to HTML via nginx
#
# Add Google Analytics tracking code to HTML response
#
# Usage:
# set $tracking_id 'UA-12345678-9';
# include incl/analytics.conf;
#
# It needs nginx compiled with option --with-http_sub_module.
# Uses optimized GA code from: http://mathiasbynens.be/notes/async-analytics-snippet
#
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
@phpcodertop
phpcodertop / 10-commandments-of-egoless-programming.md
Created August 7, 2018 19:27 — forked from gdumitrescu/10-commandments-of-egoless-programming.md
The Ten Commandments of Egoless Programming (Source: On Being A Senior Engineer)

The Ten Commandments of Egoless Programming

  1. Understand and accept that you will make mistakes.
  2. You are not your code.
  3. No matter how much "karate" you know, someone else will always know more.
  4. Don't rewrite code without consultation.
  5. Treat people who know less than you with respect, deference, and patience.
  6. The only constant in the world is change. Be open to it and accept it with a smile.
  7. The only true authority stems from knowledge, not from position.
  8. Fight for what you believe, but gracefully accept defeat.
<?php
require 'vendor/autoload.php';
use Mailgun\Mailgun;
$base64Image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeUAAAFaCAMAAAAXcrXwAAACplBMVEUAAAD/zJn//zP/ZjMAAAAAZv+ZzJn/mZnMzMxmmZnMZmaZZsx+fn7U1NT//wAqKioqKgfT0yn//fMqEQjTVCkqGBgJBgJ+MhgiIiIZIhkIBg0AVNP//35+fhjU1ADTfn7//5kAMn5/fwBLZUuqqqra2tozMzMiERETFBR+qX7p6el+ZUt+S0vTqn8RGRgqIhlmZmZUVFQZESIVEQx/VapUfn7//yb2xZOioqIVCAMjHBWMjIxmMzP0YTD19TBxcXGrVVUVFQPq6i4jIwZVRDPpu4zbr4P//8zrXS5MM2ZbW1v//w+xsbGqiGbb2ysBBAwzTU0jDQb//yuLuouZmZn//2ZwWUPpi4sPCA5wLBXGnneePx9dSjfbVyuNcVUMEQz1k5NMTA4AWOAAECo5LCJubhIAYfRUVBAAQ6kKDAr//6uqqiGUOx2Dr4PFxSYxJx2LixsAXesATMAAH08hLiY+IiKbmx40FAqigmFYMjK6SiWMNxtMHg51nHVBV0HHTyf39wBXg4MAFjgzMwCSYcLNpHtAYWGbfF3//+aGWbOTkxwbGxs6Ogvbg4OnZGSsRCIbDw5kQoVMTEw0IkW9Xl7jWi1eJRIANom9vSVUIRDb2wB3T58AJmA1RzUiFi5PLCzMzCgADCBCGgy+vr7//7yMXbtejY0UDRyRwpFZO3dVVQAAPJgALG9ELVqjoyBOdXVbeltxQ0NiOjotPS1kZA+YW1ugT0/p6QBVcVX//1Tj4y1CQgzDdXVjhWMtRER+Pz9NPi4yGxsaGgT//6N6o3qLU1MkNjb/5MsAR7P/1KlrR4///4eDg4Oyamo8KFGMRkZJJCRbWxGsrAAsHTw9Hh7MzABwOTmysiOiogD/9Os