Skip to content

Instantly share code, notes, and snippets.

View jimi008's full-sized avatar
:octocat:
Working as DevOps Engineer

Jamil Ahmed jimi008

:octocat:
Working as DevOps Engineer
View GitHub Profile
@jimi008
jimi008 / test.sql
Created September 30, 2020 16:59
Davie's Burgers Subway Ad
SELECT *
FROM orders
LIMIT 10;
-- id, user_id, order_date, restaurant_id, item_name, special_instructions
--2
SELECT DISTINCT order_date
FROM orders
@jimi008
jimi008 / test.sql
Created September 30, 2020 16:23
RPA Customer Segmentation
--1
SELECT *
FROM users
LIMIT 20;
--id, email, campaign, test, created_at, birthday
--2
@jimi008
jimi008 / test.sql
Created September 30, 2020 16:04
RPA Fraud Detection
SELECT *
FROM transaction_data
LIMIT 10;
--2
SELECT full_name, email
FROM transaction_data
where zip = 20252;
@jimi008
jimi008 / population_queries.sql
Created September 30, 2020 15:01
World Populations Challenge Project (SQL)
-- This is the first query:
SELECT DISTINCT year from population_years;
-- Add your additional queries below:
-- Largest Population of Gabon
SELECT Max(population) AS 'Largest Population of Gabon'
FROM population_years
@jimi008
jimi008 / jsonfeed2rss.php
Created April 5, 2020 22:18 — forked from daveajones/jsonfeed2rss.php
Convert JSONFeed to RSS
<?php
//Convert JSONfeed to RSS in a single function as a drop-in to make adding JSONfeed
//support to an aggregator easier
function convert_jsonfeed_to_rss($content = NULL, $max = NULL)
{
//Test if the content is actual JSON
json_decode($content);
if( json_last_error() !== JSON_ERROR_NONE) return FALSE;
@jimi008
jimi008 / functions.php
Last active March 4, 2020 09:22
Redirection plugin: ignore the files in the wp-content/cache dir because they are always temporary.
<?php
/**
* Redirection plugin: ignore the files in the wp-content/cache dir because they are always temporary.
*/
function child_theme_ignore_cachefiles($insert) {
if (isset($insert['url']) && false !== strpos($insert['url'], '/wp-content/cache/')) {
$insert = false;
}
@jimi008
jimi008 / wp-config.php
Last active February 14, 2020 18:02
WordPress Multiple Environments configuration
<?php
// Set your environment/url pairs
$environments = array(
'local' => 'website.local',
'development' => 'development.website.com',
'staging' => 'staging.website.com',
'production' => 'website.com'
);
@jimi008
jimi008 / example-wp-list-table.php
Created April 12, 2019 11:42 — forked from paulund/example-wp-list-table.php
An example code of using the WP_List_Table class. With Pagination.
<?php
/*
* Plugin Name: Paulund WP List Table Example
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area
* Plugin URI: http://www.paulund.co.uk
* Author: Paul Underwood
* Author URI: http://www.paulund.co.uk
* Version: 1.0
* License: GPL2
*/
@jimi008
jimi008 / add-wordpress-settings-page.php
Created April 3, 2019 11:28 — forked from DavidWells/add-wordpress-settings-page.php
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters
@jimi008
jimi008 / functions.php
Created December 19, 2018 14:27 — forked from eugenoprea/functions.php
Gravity Forms - Checkbox Dynamic Population
// When true, the form will be saved to DB after dynamic population
define('EO_SAVE_FORM_ON_PRE_RENDER', true);
// Adds a filter to form id 7. Replace 26 with your actual form id
add_filter('gform_pre_render_7', 'eo_populate_checkbox');
add_filter('gform_admin_pre_render_7', 'eo_populate_checkbox');
function eo_populate_checkbox($form) {
if (EO_SAVE_FORM_ON_PRE_RENDER)