Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
<script src="//code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
</head>
<body>
@asuh
asuh / gist:3956362
Created October 26, 2012 00:44
jQuery - hide from IE8
if (!$.browser.msie || $.browser.version !== "8.0") {
// Hidden from IE8
}
@asuh
asuh / frontend.php
Last active December 11, 2015 00:19 — forked from dbernar1/frontend
// .content contains content
<div class="content"></div>
<script>
$(document).ready(function() {
// ajax to fetch the slider data.
$.ajax({
type: 'POST',
url: '<?php echo admin_url("admin-ajax.php"); ?>',
data: { action: "front_page_slider" },
@asuh
asuh / Preferences.sublime-settings
Last active November 17, 2022 18:53
Sublime Text 3 User Preferences sublime-settings file
{
"always_show_minimap_viewport": true,
// Using ⌘-P, these files will never be shown in results
"binary_file_patterns":
[
"*.ai",
"*.dds",
"*.eot",
"*.gif",
"*.ico",
@asuh
asuh / templating.js
Last active December 10, 2016 08:39
JS templating system
'use strict';
/*
* Javascript templating system
*/
$(document).ready(function() {
function loadTemplate(element, path, callback, done) {
$.ajax(path).then(function(html) {
element.append(html);
if (typeof callback === 'function' ) {
@asuh
asuh / package.json
Last active December 19, 2019 21:11
NPM only, no Grunt, Gulp, Broccoli or Brunch
{
"name": "_s",
"version": "1.0.1",
"scripts": {
"clean": "rimraf style.css",
"notify": "notify -h",
"serve": "browser-sync start --proxy 'my.asuh' --files '**/*.css, **/*.js, *.php, **/*.json, dist/images/*'",
"imagemin": "imagemin src/images/* -o dist/images",
"icons": "svgo -f src/images/icons -o dist/images/icons && svg-sprite-generate -d dist/images/icons -o dist/images/icons/sprite.svg",
"lint-scss": "stylelint 'sass/**/*.scss' --syntax scss --config node_modules/stylelint-config-wordpress/scss.js",

Keybase proof

I hereby claim:

  • I am asuh on github.
  • I am asuh (https://keybase.io/asuh) on keybase.
  • I have a public key ASA5GySldrdOvSxhRE_sFiMC-3aayiBOE3cHASzXvr0Kwwo

To claim this, I am signing this object:

@asuh
asuh / comments.php
Created May 27, 2018 20:09
Walker_Comment overwrite for WordPress
<?php
class comments_reloaded extends \Walker_Comment {
var $tree_type = 'comment';
var $db_fields = array(
'parent' => 'comment_parent',
'id' => 'comment_ID'
);
// start_lvl – Wrapper for child comments list, starts the list before the elements are added.
@asuh
asuh / boxstarter.ps1
Last active October 30, 2018 14:29 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@asuh
asuh / filter-wc-orders-by-gateway.php
Created July 21, 2019 21:26 — forked from bekarice/filter-wc-orders-by-gateway.php
Filters WooCommerce Orders by Payment Gateway Used
<?php
/**
* Plugin Name: Filter WooCommerce Orders by Payment Method
* Plugin URI: http://skyverge.com/
* Description: Filters WooCommerce orders by the payment method used :)
* Author: SkyVerge
* Author URI: http://www.skyverge.com/
* Version: 1.0.0
* Text Domain: wc-filter-orders-by-payment
*