Skip to content

Instantly share code, notes, and snippets.

View hasinhayder's full-sized avatar
🚀
Back on track, yayyyy!

Hasin Hayder hasinhayder

🚀
Back on track, yayyyy!
View GitHub Profile
@hasinhayder
hasinhayder / _ide_helper.php
Created July 11, 2016 20:01 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.1.31 (LTS) on 2016-03-01.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
@hasinhayder
hasinhayder / curl_progress.php
Created September 1, 2016 20:16 — forked from bdunogier/curl_progress.php
PHP/cURL download progress monitoring
<?php
file_put_contents( 'progress.txt', '' );
$targetFile = fopen( 'testfile.iso', 'w' );
$ch = curl_init( 'http://ftp.free.org/mirrors/releases.ubuntu-fr.org/11.04/ubuntu-11.04-desktop-i386-fr.iso' );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $ch, CURLOPT_NOPROGRESS, false );
curl_setopt( $ch, CURLOPT_PROGRESSFUNCTION, 'progressCallback' );
curl_setopt( $ch, CURLOPT_FILE, $targetFile );
sudo chown -R $(whoami) /usr/local
@hasinhayder
hasinhayder / Migration.js
Created March 21, 2017 09:00 — forked from stevebrun/Migration.js
A script for migrating the primary domain of a Google Apps account.
// migrate the script executer's primary domain
// domainName - the desired domain to migrate to
function migrateDomain(organizationName, domainName) {
var customerId = 'my_customer';
var customer = AdminDirectory.Customers.get(customerId);
customer.customerDomain = domainName;
customer.postalAddress.organizationName = organizationName;
customer.customerCreationTime = undefined; //
AdminDirectory.Customers.patch(customer, customerId);
@hasinhayder
hasinhayder / vimeo.com.ffpreset
Created July 5, 2018 20:34 — forked from johnjohndoe/vimeo.com.ffpreset
FFmpeg settings for vimeo.com
// FFmpeg settings for vimeo.com
// =============================
// Trying to find the best settings for encoding videos as described here: http://vimeo.com/help/compression
//
// Input file: MTS
// Video: H264, 1920x1080, 50fps
// Audio: A52 Audio (aka AC3), Stereo, 48kHz, 256kbps
ffmpeg -i input.mts -vcodec libx264 -acodec aac -strict experimental -vpre hq -s hd720 -b 5000k -ab 320k -r 25 -g 25 -threads 0 output.mp4
<?php
/**
* Plugin Name: Customize Post Preambles
* Author: Weston Ruter, XWP
* Description: Demo plugin for Customize Posts to add a section before each post in The Loop that contains a preamble content stored in postmeta.
*
* @package CustomizePostPreambles
*/
namespace CustomizePostPreambles;
@hasinhayder
hasinhayder / php7.1.md
Last active August 27, 2018 06:53 — forked from VirtuBox/php7.1.md
How to install php7.1-fpm with EasyEngine

How to install php7.1-fpm with EasyEngine


Install php7.1-fpm

apt install php7.1-common php7.1-cli php7.1-zip php7.1-opcache php7.1-mysql php7.1-mcrypt php7.1-mbstring php7.1-json php7.1-intl php7.1-gd php7.1-fpm php7.1-curl php7.1-bz2 php7.1-xml

Copy the php7.1-fpm pool configuration from php7.0-fpm

cp -f /etc/php/7.0/fpm/pool.d/www.conf /etc/php/7.1/fpm/pool.d/www.conf
@hasinhayder
hasinhayder / comments.css
Created September 2, 2018 11:12 — forked from mosaddekhossain/comments.css
flow blog comments and form css
//comments list
.single-post .commentlist {
margin-bottom: 3rem;
list-style: none;
padding-left: 0;
}
.single-post .commentlist li, .single-post .commentlist .comment-body {
margin-bottom: 3rem;
@hasinhayder
hasinhayder / add-term-to-custom-taxonomy.php
Created September 7, 2018 08:57 — forked from ms-studio/add-term-to-custom-taxonomy.php
add term metabox to custom taxonomy - using WP 4.4 term meta functions
<?php
// source: http://wordpress.stackexchange.com/questions/211703/need-a-simple-but-complete-example-of-adding-metabox-to-taxonomy
// code authored by jgraup - http://wordpress.stackexchange.com/users/84219/jgraup
// CREATE CUSTOM TAXONOMY
add_action( 'init', '___create_my_custom_tax' );
<?php
function themename_customize_register($wp_customize){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));
// =============================