Skip to content

Instantly share code, notes, and snippets.

View FrankM1's full-sized avatar
🎯
Focusing

Franklin Gitonga FrankM1

🎯
Focusing
View GitHub Profile
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@FrankM1
FrankM1 / TGM plugin activation
Last active March 31, 2019 13:58
TGM plugin modified to support plugin updates by Hogash
<?php
/**
* Plugin installation and activation for WordPress themes.
*
* @package TGM-Plugin-Activation
* @version 2.4.1
* @author Thomas Griffin <thomasgriffinmedia.com>
* @author Gary Jones <gamajo.com>
* @copyright Copyright (c) 2012, Thomas Griffin
* @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
<?php
define( 'THEMENAME', 'Kallyas' );
require_once dirname( __FILE__ ) . '/framework/class-tgm-plugin-activation.php';
add_action( 'tgmpa_register', 'kallyas_register_required_plugins' );
function kallyas_register_required_plugins() {
/**
@FrankM1
FrankM1 / For each Group 1
Created August 27, 2013 06:23
Grouping items in a foreach loop
<?php
$i = 0;
$group = 0;
$group_by = 5;
while ($i < 19){
$i++;
if ($group == 0) {//new group start
echo "<li>";
}
echo "<div>item " . $i . "</div>";
// Disable WooCommerce styles
function radium_dequeue_css_from_woocommerce() {
wp_dequeue_style( "woocommerce-smallscreen" );
wp_dequeue_style( "woocommerce-layout" );
wp_dequeue_style( "woocommerce-general" );
}
add_action('wp_print_styles', 'radium_dequeue_css_from_woocommerce', 100);
@FrankM1
FrankM1 / Skin-for-Video-JS.markdown
Created March 21, 2014 12:52
A Pen by Franklin Gitonga.
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Color Scheme - Default/Tomorrow-Night-Eighties.tmTheme",
"file_exclude_patterns":
[
".DS_Store"
],
"folder_exclude_patterns":
[
"bin",
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-08-25
#
# _______________| httpstatus : get HTTP status code
#
# Usage: httpstatus URL [timeout] [--code or --status] [see 4.]
# ^message with code (default)
# ^code (numeric only)
# ^in secs (default: 3)
# ^URL without "http://" prefix works fine.
@FrankM1
FrankM1 / spacenav.js
Created June 5, 2014 01:41
Space out menus evenly
(function($){
// Space out menu items evenly
$.fn.spaceNav = function() {
var mainMenu = $(this).find('.nav-collapse').find('.nav');
var weatherMenu = $(this).find('#nav-weather');
var menuItems = $(this).find('li');
var menuLinks = $(this).find('li').find('a');
@FrankM1
FrankM1 / Wave.markdown
Created July 20, 2014 21:37
A Pen by Franklin Gitonga.