Skip to content

Instantly share code, notes, and snippets.

View mehranhadidi's full-sized avatar
🚀

Mehran Hadidi mehranhadidi

🚀
  • Solvd
View GitHub Profile
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddRenewsAtColumnToSubscriptions extends Migration
{
/**
* Run the migrations.
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
<?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 August 6, 2019 13:52 — forked from iamandrewluca/oss-tools.md
Open source software tools
@mehranhadidi
mehranhadidi / share_social_button.html
Created July 4, 2019 12:28 — forked from eduardobc88/share_social_button.html
Share HTML Button Telegram and WhatsApp
<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>
#! /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 August 15, 2017 08:52 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
@mehranhadidi
mehranhadidi / SparkPost cURL Create (POST) Transmissions API Example
Created June 11, 2017 09:28 — forked from bdeanindy/SparkPost cURL Create (POST) Transmissions API Example
cURL POST Example to send an email using the SparkPost Transmissions API
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
#
# REQUIRES:
# - server (the forge server instance)
# - site_name (the name of the site folder)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - event_id (the provisioning event name)
# - callback (the callback URL)
#

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew