Skip to content

Instantly share code, notes, and snippets.

View ipokkel's full-sized avatar

Theuns Coetzee ipokkel

View GitHub Profile
// Background mixin
@mixin strips($color, $angle){
$color: saturate(lighten($color, 2%), 10%);
background: $color
linear-gradient($angle, $color 0%, $color 10%,
mix(black, $color, 5%) 10%, mix(black, $color, 5%) 20%,
mix(black, $color, 12%) 19%, mix(black, $color, 10%) 21%, // Thin line between gradient
mix(black, $color, 10%) 20%, mix(black, $color, 10%) 30%,
mix(black, $color, 17%) 29%, mix(black, $color, 15%) 31%, // Thin line between gradient
mix(black, $color, 15%) 30%, mix(black, $color, 15%) 40%,
@LukyVj
LukyVj / SassMeister-input.scss
Last active October 9, 2017 06:23
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// SASSVG
//
// API :
// svg(<shape>, <size>, <color>, <unit>, <repeat>, <path:false>);
@mixin svg($shape, $size, $color, $unit, $repeat, $path: false) {
@jonathantneal
jonathantneal / protocol.html
Last active October 9, 2017 07:24
Launching external protocols from anchors.
<p><a href="//facebook.com/119703784116" data-external="fb://profile/119703784116">Facebook</a>
<p><a href="//foursquare.com/v/4e4b3090fa7671a85ce77d0e" data-external="foursquare://venues/4e4b3090fa7671a85ce77d0e">Foursquare</a>
<p><a href="//twitter.com/oisfinc" data-external="twitter:/user?screen_name=oisfinc">Twitter</a>
<p><a href="//yelp.com/biz/orange-international-street-fair-orange" data-external="yelp:/biz/orange-international-street-fair-orange">Yelp</a>
<p><a href="//example.com/foo" data-external="example:/foo">Example</a>
@jonathantneal
jonathantneal / function.php
Last active October 9, 2017 07:26
Render Menu
<?php
/**
* Render_Menu
* -----------------
* Render a menu using simple, semantic HTML
*
* Usage: new Render_Menu(@name)
*
* @name (string) name of the menu ("main-navigation")
@jonathantneal
jonathantneal / README.md
Last active October 9, 2017 07:42
Using an SVG Icon System in WordPress with Grunt

Using an SVG Icon System in WordPress with Grunt

  1. Add [grunt-svgstore] to your build tool:

    npm install grunt-svgstore --save-dev
  2. Create an svgstore task in Grunt (like tasks/options/svgstore.js):

@jonathantneal
jonathantneal / README.md
Last active October 9, 2017 07:43
Switching to an SVG Icon System from IcoMoon Fonts

Switching to an SVG Icon System from IcoMoon Fonts

  1. Goto to the [IcoMoon App] and click “[Selection]” at the bottom. Screenshot of Selection page

  2. Open the menu list for your icon set and choose “Select All”. Screenshot of Selection page with open menu list

  3. Click “[Generate SVG & More]” at the bottom. Screenshot of SVG page

@mixin diagonal($rotation, $background, $height, $pos: after)
&:#{$pos}
content: ''
display: block
position: absolute
width: 100%
height: $height
background: #{$background}
transform: skewY($rotation)
@indikatordesign
indikatordesign / wp-config.php
Last active October 27, 2017 13:49
[WordPress Debug.log and useful var_dump snippet]Allows you to write the error.log right into the wp-content-folder. You can also use something like this to var_dump to your error log: - idWriteLog( $myVar, 'varName' ); - or - idWriteLog( myFunc(), 'funcName' ); - It is especially useful to var_dump ajax requests and will also show you on which …
<?php
// Add the snippet below in the file wp-config.php right above: /* That's all, stop editing! Happy blogging. */
define('WP_DEBUG', true );
if ( WP_DEBUG )
{
define('SAVEQUERIES', true );
@LukyVj
LukyVj / outOfViewport.js
Last active November 15, 2017 10:44
Detect which elements overlap your document width.
function outOfViewport(colorWrapper, colorTag, colorClass) {
var w = document.body.offsetWidth,
it = document.querySelectorAll('*');
for ( i in it) {
if( it[i].offsetWidth > w ) {
console.log(
`%c [` +
`%c` + it[i].tagName +
`%c.`+ it[i].classList +
`%c]`+
@BurningDog
BurningDog / config.yaml
Last active May 17, 2018 09:30 — forked from pkuczynski/parse_yaml.sh
Replace local Wordpress database (running inside Homestead) with production database
prod:
# ssh authentication details
ssh: user@example.com
# path to wordpress on the server
wordpress: path/to/wordpress
# path to backups folder on the server (must exist)
backups: backups
# production url
url: www.example.com