Skip to content

Instantly share code, notes, and snippets.

View mehranhadidi's full-sized avatar
🚀

Mehran Hadidi mehranhadidi

🚀
  • Solvd
View GitHub Profile

XCode

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

XCode CLI Tools

  • xcode-select --install

Install Homebrew

@mehranhadidi
mehranhadidi / php-useful-tools.md
Last active February 19, 2017 09:26
php usefull tools
@mehranhadidi
mehranhadidi / gist:006ae3bcddb74ad80f2d284cc4b20c48
Last active May 29, 2017 05:29
Create an static call on normal methods php
<?php
class Test
{
static function __callStatic($method, $args)
{
return self::new()->{$method}(...$args);
}
private static function new(...$args)
#
# 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)
#
@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
@mehranhadidi
mehranhadidi / !NOTE.md
Created August 15, 2017 08:52 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
#! /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 / Aliases
Last active August 25, 2018 07:48
A bunch of custom aliases for myself
#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'
@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>
@mehranhadidi
mehranhadidi / oss-tools.md
Created August 6, 2019 13:52 — forked from unrevised6419/oss-tools.md
Open source software tools