Skip to content

Instantly share code, notes, and snippets.

@dennykuo
dennykuo / Math.php
Created May 21, 2021 02:26 — forked from jgrossi/Math.php
Math class from Taylor Otwell. Thanks to @brad ([email protected]) for the class content.
<?php
class Math {
/**
* The base.
*
* @var string
*/
private static $base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@dennykuo
dennykuo / uikit3.blade.php
Created December 24, 2018 06:07 — forked from roshangautam/uikit3.blade.php
Laravel 5 Pagination - UIKit 3
@if ($paginator->hasPages())
<ul class="uk-pagination">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="uk-disabled"><span>&laquo;</span></li>
@else
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">&laquo;</a></li>
@endif
{{-- Pagination Elements --}}
@dennykuo
dennykuo / jQuery.serializeJSON.js
Last active July 2, 2018 06:04
jQuery serializeJSON
$.fn.serializeJSON = function() {
var data = {};
var source = this.serializeArray();
$.each(source, function () {
if (data[this.name]) {
if ( ! data[this.name].push) {
data[this.name] = [data[this.name]];
}
data[this.name].push(this.value || '');
["change", "keyup", "paste", "input", "propertychange", "..."].forEach(function(event) {
document.querySelectorAll('.element').addEventListener(event, function() {
// Your callback here
}, false);
});
RewriteRule ^assets/css/(.*) wp-content/themes/[theme_name]/assets/css/$1 [QSA,L]
RewriteRule ^assets/js/(.*) wp-content/themes/[theme_name]/assets/js/$1 [QSA,L]
RewriteRule ^assets/img/(.*) wp-content/themes/[theme_name]/assets/img/$1 [QSA,L]
RewriteRule ^plugins/(.*) wp-content/plugins/$1 [QSA,L]
@dennykuo
dennykuo / config.rb
Last active August 29, 2015 14:21 — forked from timkelty/config.rb
# Note that while this file is in our config folder, it is
# symlinked to our site folders, so paths are relative from there
# Require gems and Compass plugins
# require 'rgbapng'
# require 'compass-fancybox-plugin'
require 'compass-growl'
# General
output_style = :expanded
@dennykuo
dennykuo / index.html
Last active August 29, 2015 14:14
無線循環css animation
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style>
@keyframes myAnimation {
0%, 100% { transform: rotate(-3deg); }
50% { transform: rotate(3deg); }
}
/* Gmail style scrollbar */
::-webkit-scrollbar {
width: 12px
}
::-webkit-scrollbar-thumb {
border-width: 1px 1px 1px 2px
}
::-webkit-scrollbar-track {
border-width: 0
}
// SmoothScroll for websites v1.2.1
// Licensed under the terms of the MIT license.
// People involved
// - Balazs Galambosi (maintainer)
// - Michael Herf (Pulse Algorithm)
(function(){
// Scroll Variables (tweakable)