Skip to content

Instantly share code, notes, and snippets.

View noone0's full-sized avatar

Murat Kader noone0

View GitHub Profile
@noone0
noone0 / centos_php7_fresh.sh
Created February 7, 2018 19:26 — forked from nunorbatista/centos_php7_fresh.sh
PHP7 Centos 7 fresh install script
#/!/bin/bash
# update system
yum update -y
# install bind-utils
sudo yum install bind-utils
# Apache
yum install nano wget curl vim git httpd -y
@noone0
noone0 / curl-multi-test.php
Created February 26, 2017 18:40 — forked from gilbitron/curl-multi-test.php
Testing 95 regular curl_exec requests vs curl_multi_exec requests
<?php
$sites = [
'http://www.google.com/',
'http://www.facebook.com/',
'http://www.youtube.com/',
'http://www.yahoo.com/',
'http://www.live.com/',
'http://www.wikipedia.org/',
'http://www.baidu.com/',
@noone0
noone0 / AWSLambdaSimpleVoice.js
Created February 26, 2017 18:13 — forked from nickmalcolm/AWSLambdaSimpleVoice.js
AWS Lambda Function to make Voice calls via the Twilio API
// 2016 MIT licence. Nick Malcolm.
// Based on https://gist.github.com/stevebowman/7cff9dd80b227c899728
// Makes a call using Twilio's API.
// Expects the following Lambda environment variables:
// TWILIO_ACCOUNT_SID - your account ID
// TWILIO_AUTH_TOKEN - an auth token generated in the Twilio console e.g. ABCD1234
// TWILIO_FROM_NUMBER - the number you've purchased to make calls from e.g. +14243700000
// We'll call this number
function callApi($method, $function, $data = false)
{
$curl = curl_init();
$url = $this->parentUrl.$function;
switch ($method)
{
case "POST":
curl_setopt($curl, CURLOPT_POST, 1);
function resize($image, $width, $height, $mod,$waterMarkImage =false)
{
if ( ! file_exists($image)) exit;
$imageModified = @filemtime($image);
$image_properties = getimagesize($image);
if ( ! $image_properties) {
return false;
}
//---------------------------------------------
$image_width = $image_properties[0];