Skip to content

Instantly share code, notes, and snippets.

View FrankM1's full-sized avatar
🎯
Focusing

Franklin Gitonga FrankM1

🎯
Focusing
View GitHub Profile
{
"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",
@FrankM1
FrankM1 / Skin-for-Video-JS.markdown
Created March 21, 2014 12:52
A Pen by Franklin Gitonga.
// 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 / 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>";
<?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 / 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
@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 / index.html
Created June 19, 2013 07:44
A CodePen by Franklin Gitonga. Sexy Social Buttons - CSS only animation effect on hover of these simple but fun social buttons.
<a href="http://twitter.com/radiumthemes" class="icon-button twitter"><i class="icon-twitter"></i><span></span></a>
<a href="http://facebook.com" class="icon-button facebook"><i class="icon-facebook"></i><span></span></a>
<a href="http://plus.google.com" class="icon-button google-plus"><i class="icon-google-plus"></i><span></span></a>
@FrankM1
FrankM1 / index.html
Created June 18, 2013 13:10
A CodePen by Franklin Gitonga.
<ul class="projectNavigation">
<li>
<a id="leftButton" href="#">
<div style="">
<!--?xml version="1.0" encoding="utf-8" ?-->
<svg version="1.1"><g transform="rotate(-90 32 32)"><rect x="32" y="26" width="1" height="1" fill="#ffffff"></rect><rect x="31" y="27" width="3" height="1" fill="#ffffff"></rect><rect x="30" y="28" width="5" height="1" fill="#ffffff"></rect><rect x="29" y="29" width="7" height="1" fill="#ffffff"></rect><rect x="32" y="30" width="1" height="1" fill="#ffffff"></rect><rect x="32" y="31" width="1" height="1" fill="#ffffff"></rect><rect x="32" y="33" width="1" height="1" fill="#ffffff"></rect><rect x="32" y="35" width="1" height="1" fill="#ffffff"></rect><rect x="32" y="37" width="1" height="1" fill="#ffffff"></rect></g></svg></div>
</a></li>
<li><a id="topButton" href="#"><div ><!--?xml version="1.0" encoding="utf-8" ?--><svg version="1.1"><g transform="rotate(0 32 32)"><rect x="32" y="26" width="1" height="1" fill="#ffffff"></rect><rect x="31" y="27" widt
#navigation .main_menu > ul > li{
/* one item */
&:first-child:nth-last-child(1) {
width: 100%;
}
/* two items */
&:first-child:nth-last-child(2),
&:first-child:nth-last-child(2) ~ li {