Skip to content

Instantly share code, notes, and snippets.

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

Theuy Limpanont tlimpanont

🏠
Working from home
View GitHub Profile
@tlimpanont
tlimpanont / script.js
Last active September 4, 2015 16:04
CustomerList Table
/* COLUMN FILTER */
var otable = $('#datatable_fixed_column').DataTable({
//"bFilter": false,
//"bInfo": false,
//"bLengthChange": false
//"bAutoWidth": false,
//"bPaginate": false,
//"bStateSave": true // saves sort state using localStorage
"sDom": "<'dt-toolbar'<'col-xs-12 col-sm-6 hidden-xs'f><'col-sm-6 col-xs-12 hidden-xs'<'toolbar'>>r>" +
"t" +
@tlimpanont
tlimpanont / es6AngularModuleInheritance.md
Created May 22, 2015 11:58
Solution proposal: ES6 Class for ngModle.filter, ngModule.directive, ngModule.factory, ngModule.controller, ngModule.service, ngModule.provider

Solution proposal: ES6 Class for ngModule.filter, ngModule.directive, ngModule.factory, ngModule.controller, ngModule.service, ngModule.provider

app/index.js

#!javascript
require('./utils/NgModuleParents'); // will expose the NgDirective, NgFilter etc to the window scope

@tlimpanont
tlimpanont / angular-formly-unit-testing.js
Last active October 3, 2024 10:52
angular-formly basic unit-testing
describe('basic angular-formly testing', function () {
var scope,
form,
directiveHTML,
formEl,
name,
customAsyncValidatorSpy,
customValidatorSpy;
//you need to indicate your module in a test
@tlimpanont
tlimpanont / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tlimpanont
tlimpanont / Mongoose.js
Last active August 29, 2015 14:18
if you want to work with mongoose lib in Sails. All you have to do is open a connection and invoke a done callback from the boostrap.js file.
// make a service file as Mongoose.js
// [sails root] --> api --> services --> bootstrap.js
var Promise = require("bluebird");
var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var deepPopulate = require('mongoose-deep-populate');
var UserSchema = new Schema({
firstname: {
@tlimpanont
tlimpanont / designer.html
Created November 26, 2014 13:10
designer
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
@tlimpanont
tlimpanont / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-pages/core-pages.html">
<polymer-element name="my-element">
@tlimpanont
tlimpanont / dabblet.css
Created August 25, 2014 13:43
Disabled state of submitted button
/**
* Disabled state of submitted button
*/
.myHavensteder_Button_127_18.disabled {
/*background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH8AAABOCAYAAAAJm8kbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAADXSURBVHic7dqhEYAwEEVBgkchUjVtodITlBHxdiu4mSe+ubHW+g6Szt0HsI/4YeKHiR8mfpj4YeKHiR8mfpj4YeKHiR8mfpj4YeKHiR8mPkDKeObthy/K5oeJHyZ+mPhh4oeJHyZ+mPhh4oeJHyZ+mPhh4oeJHyZ+mPhh4gOkjPeafviibH6Y+GHih4kfJn6Y+GHih4kfJn6Y+GHih4kfJn6Y+GHih4kfJj5Aih++MJsfJn6Y+GHih4kfJn6Y+GHih4kfJn6Y+GHih4kfJn6Y+GHih4kf9gOk7Al4cNXkIgAAAABJRU5ErkJggg==) no-repeat scroll 0px 0px;*/
cursor: default;
opacity: 0.2;
}
.myHavensteder_Button_127_18 {
@tlimpanont
tlimpanont / dabblet.css
Last active August 29, 2015 14:05
Fancy header style with CSS3 Triangle
/**
* Fancy header style with CSS3 Triangle
*/
.arrow-down {
width: 0;
height: 0;
border-left: 13px solid transparent;
border-right: 13px solid transparent;
margin: 0 auto;
@tlimpanont
tlimpanont / dabblet.css
Created August 19, 2014 14:03 — forked from anonymous/dabblet.css
CSS3 Grayscale and hover animation on pictorgrams
/**
* CSS3 Grayscale and hover animation on pictorgrams
*/
@import url('//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css');
html, body {
font-family: Arial, Verdana, sans-serif;
}
a:link, a:visited, a {
color: #000;