Skip to content

Instantly share code, notes, and snippets.

View klihelp's full-sized avatar
🎯
Focusing on life and money farm

klihelp

🎯
Focusing on life and money farm
View GitHub Profile
@garris
garris / TremulaJS-Boilerplate.markdown
Last active December 12, 2015 13:57
A Pen by Garris.

TremulaJS Boilerplate

TremulaJS is a client-side javascript UI component providing Bézier-based content-stream interactions with momentum & physics effects for mouse, scroll and and touch UIs.

This Pen allows you to experiment using different config file settings.

A Pen by Garris on CodePen.

License.

@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@woogist
woogist / gist:02f460967aa230641257
Created June 12, 2014 10:00
WooCommerce Bookings: date format
<?php
// Bookings Date Format Tweak
add_filter( 'woocommerce_bookings_date_format' , 'woocommerce_bookings_custom_date_format' );
/**
* woocommerce_bookings_custom_date_format
*
* @access public
* @since 1.0
@woogist
woogist / gist:f82d5132e474d510f3e8
Created June 11, 2014 15:28
unregister / enqueue Bookings styles
<?php
function woo_dequeue_booking_styles() {
wp_dequeue_style( 'wc-bookings-styles' );
wp_deregister_style( 'wc-bookings-styles' );
}
add_action( 'wp_print_styles', 'woo_dequeue_booking_styles', 100 );
@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@L422Y
L422Y / !README.md
Last active June 1, 2023 17:08
Dynamic, Responsive font-sizes and spacing using em units and JavaScript

Dynamic responsive font-sizing is something I see missing on many “responsive” websites. Breakpoints are nice but I have better things to do with my time than defining infinite font-size adjustments. (so do you!)

To implement this, we’re going to take advantage of the em font sizing unit in CSS.

Click here to see what I'm talking about: codepen.io/lawrencealan/full/eJqlu

Text sizing using the em unit

A single em is equal to the current font-size of the closest parent which has a font-size set.

@wbroek
wbroek / genymotionwithplay.txt
Last active February 13, 2025 09:37
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@hugeuser
hugeuser / Mobile
Last active August 10, 2016 18:47
"Scroll-Jacking in Full Screen."
var delta;
dragThreshold = 0.15;// "percentage" to drag before engaging
dragStart = null; // used to determine touch / drag distance
percentage = 0,
target,
previousTarget;
function touchStart(event) {
if (dragStart !== null) { return; }
@chris-morgan
chris-morgan / details.js
Last active April 15, 2019 15:23 — forked from remy/details.js
/**
* Note that this script is intended to be included at the *end* of the document, before </body>
*/
(function (window, document) {
if ('open' in document.createElement('details')) return;
// made global by myself to be reused elsewhere
var addEvent = (function () {
if (document.addEventListener) {
return function (el, type, fn) {
@woogist
woogist / woocommerce-customer-order-csv-export-renaming-removing-reordering-columns.php
Created February 6, 2014 03:46
WooCommerce Customer/Order CSV Export: Renaming / Removing / Reordering Columns
<?php
// rename a column
function wc_csv_export_rename_column( $column_headers ) {
// rename the order_notes column to notes
// make sure to not change the key (`order_notes`) in this case
// as this matches the column to the relevant data
// simply change the value of the array to change the column header that's exported
$column_headers['order_notes'] = 'Notes';