Skip to content

Instantly share code, notes, and snippets.

View squalltua's full-sized avatar
🏠
Working from home

Pukkapol Tantikittipisut squalltua

🏠
Working from home
View GitHub Profile
@squalltua
squalltua / gist:e9c5170732ab9125187e
Last active February 8, 2016 03:22
Convert JS function to Perl
use strict;
# https://github.com/fengyuanchen/cropperjs/blob/94328c9497c526446f749640c3fa6192ded09035/src/js/utilities.js
# https://github.com/fengyuanchen/cropperjs/blob/0da5c741102489a130e72c92785b7dfda97e5b37/dist/cropper.js
# https://github.com/fengyuanchen/cropperjs/blob/master/src/js/preview.js
sub preview {
my $self = shift;
my $args = shift;
@squalltua
squalltua / Gruntfile.js
Created May 5, 2016 15:10
sample Gruntfile.js for watching and compiling less files.
'use strict';
module.exports = function (grunt) {
// load all grunt tasks
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
watch: {
// if any .less file changes in directory "public/css/" run the "less"-task.
$countryList = [
"AF" => "Afghanistan",
"AL" => "Albania",
"DZ" => "Algeria",
"AS" => "American Samoa",
"AD" => "Andorra",
"AO" => "Angola",
"AI" => "Anguilla",
"AQ" => "Antarctica",
"AG" => "Antigua and Barbuda",
@squalltua
squalltua / main.scss
Created September 9, 2017 08:41 — forked from KittyGiraudel/main.scss
From: Architecturing a Sass project
// Sass utilities
@import "helpers/variables";
@import "helpers/functions";
@import "helpers/mixins";
@import "helpers/placeholders";
// Vendors and external stylesheets
@import "vendors/bootstrap";
@import "vendors/jquery-ui";
@squalltua
squalltua / reset.scss
Created September 9, 2017 09:03 — forked from HamptonMakes/reset.scss
Reset SCSS
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
@squalltua
squalltua / gist:01900a7c78d20bd27ee40acef8dbf26a
Created January 9, 2018 05:40
pagination style for cakephp 3 and bootstrap 4
.pagination {
display: flex;
padding-left: 0;
list-style: none;
}
.page-item:first-child .page-link, .pagination-datatables li:first-child .page-link, .pagination li:first-child .page-link, .page-item:first-child .pagination-datatables li a, .pagination-datatables li .page-item:first-child a, .pagination-datatables li:first-child a, .page-item:first-child .pagination li a, .pagination li .page-item:first-child a, .pagination li:first-child a {
margin-left: 0;
}