Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀

Mehran Hadidi mehranhadidi

🚀
  • Solvd
View GitHub Profile
View 2018_02_13_142413_add_renews_at_column_to_subscriptions.php
<?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
patbenatar.advanced-new-file
formulahendry.auto-close-tag
formulahendry.auto-rename-tag
fosshaas.fontsize-shortcuts
BriteSnow.vscode-toggle-quotes
Zignd.html-css-class-completion
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
octref.vetur
dbaeumer.vscode-eslint
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
<?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: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
@mehranhadidi
mehranhadidi / oss-tools.md
Created Aug 6, 2019 — forked from iamandrewluca/oss-tools.md
Open source software tools
@mehranhadidi
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=https://www.google.com.mx/" data-action="share/whatsapp/share" >Compartir en WhatsApp</a>
<br>
<a class="tgme_action_button" href="tg://msg_url?url=https://www.google.com.mx/">Compartir en Telegram</a>
@mehranhadidi
mehranhadidi / Aliases
Last active Aug 25, 2018
A bunch of custom aliases for myself
View Aliases
#kerio
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
/* PHP Slowloris
* Adapted from the script found here: http://seclists.org/fulldisclosure/2009/Jun/207
* Contains get based attack (slow headers) and post based attack (long content length)
*
* Author: Seppe vanden Broucke
*/
function usage($argv){
@mehranhadidi
mehranhadidi / !NOTE.md
Created Aug 15, 2017 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
View !NOTE.md
@mehranhadidi
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}}"}}' \
https://api.sparkpos