Skip to content

Instantly share code, notes, and snippets.


Mehran Hadidi mehranhadidi

  • Solvd
View GitHub Profile
View 2018_02_13_142413_add_renews_at_column_to_subscriptions.php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddRenewsAtColumnToSubscriptions extends Migration
* Run the migrations.
View vs-code-extensions.txt
View gist:97364a0f76c75778df8d666c83a8bfd1
add_filter('mime_types', 'my_mimes');
function my_mimes($all)
// I cannot have both because wordpress doesn't allow it but i need both because each file can be one of these mime types
// $all['eps'] = 'application/postscript';
$all['eps'] = 'image/x-eps';
return $all;
View forminator-custom-post-data-field-type.php
* Plugin Name: [Forminator] - Custom Post Data Field Type
* Description: [Forminator] - Custom Post Data Field Type - change content field type from wp-editor to textarea and add support advanced custom field (text, url, number, email type).
* Author: Thobk @ WPMUDEV
* Author URI:
* License: GPLv2 or later
if ( ! defined( 'ABSPATH' ) ) {
mehranhadidi /
Created Aug 6, 2019 — forked from iamandrewluca/
Open source software tools
mehranhadidi / share_social_button.html
Created Jul 4, 2019 — forked from eduardobc88/share_social_button.html
Share HTML Button Telegram and WhatsApp
View share_social_button.html
<a href="whatsapp://send?text=" data-action="share/whatsapp/share" >Compartir en WhatsApp</a>
<a class="tgme_action_button" href="tg://msg_url?url=">Compartir en Telegram</a>
mehranhadidi / Aliases
Last active Aug 25, 2018
A bunch of custom aliases for myself
View Aliases
alias kerio='sudo /etc/init.d/kerio-kvc'
# git
alias gs='git status'
alias ga='git add'
alias gc='git commit -m'
alias gl='git log'
alias gp='git push'
alias nah='git reset --hard && git clean -df'
View slowloris.php
#! /usr/bin/env php
/* PHP Slowloris
* Adapted from the script found here:
* Contains get based attack (slow headers) and post based attack (long content length)
* Author: Seppe vanden Broucke
function usage($argv){
mehranhadidi / !
Created Aug 15, 2017 — forked from ivanvermeyen/!
Setup a Laravel Storage driver with Google Drive API
View !
mehranhadidi / SparkPost cURL Create (POST) Transmissions API Example cURL POST Example to send an email using the SparkPost Transmissions API
View SparkPost cURL Create (POST) Transmissions API Example
curl \
-H "Content-Type: application/json" \
-H "Authorization: <REPLACE_WITH_YOUR_API_KEY>" \
-X POST -d '{"options":{"open_tracking":true,"click_tracking":true},"return_path":"bounces@<REPLACE_WITH_YOUR_SENDING_DOMAIN_HERE>","metadata":{"some_useful_metadata":"testing_sparkpost"},"substitution_data":{"signature":"<REPLACE_WITH_YOUR_FIRST_AND_LAST_NAME>"},"recipients":[{"address":{"email":"<REPLACE_WITH_YOUR_EMAIL_ADDRESS>","tags":["learning"],"substitution_data":{"customer_type":"Platinum","first_name":"<REPLACE_WITH_YOUR_FIRST_NAME>"}}}],"content":{"from":{"name":"Awesome Company","email":"testing@<REPLACE_WITH_YOUR_SENDING_DOMAIN>"},"subject":"My first SparkPost Transmission","reply_to":"Awesome Company ","text":"Hi {{address.first_name}}\r\nYou have just sent your first email through SparkPost!\r\nCongratulations,\r\n{{signature}}","html":"<strong>Hi {{address.first_name}},</strong><p>You have just sent your first email through SparkPost!</p><p>Congratulations!</p>{{signature}}"}}' \