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 / app.component.ts
Last active August 4, 2016 21:27
Angular2 WebSocket Class | Can connect to raw websocket url using engine.io-client and have the ability to reconnect it's self and emit connectivity status
import { Component } from '@angular/core';
import {WebSocketClient} from './websocket-client';
@Component({
selector: 'my-app',
template: '<h1>Websocket connectivity: <small>{{connectivity}}</small></h1>'
})
export class AppComponent {
connectivity:string;
constructor() {
@tlimpanont
tlimpanont / alternative_readme.md
Last active July 18, 2016 06:56
ALTERNATIVE test branch without colon folders vagrant stuffs
@tlimpanont
tlimpanont / Borders on bootstrap columns with various height.markdown
Last active June 14, 2016 06:30
Borders on bootstrap columns with various height
@tlimpanont
tlimpanont / Gulpfile.js
Created April 20, 2016 14:27
random bootstrap html tags on page
var gulp = require('gulp');
var path = require('path');
var clean = require('gulp-clean');
var gutil = require('gulp-util');
var runSequence = require('gulp-run-sequence');
gulp.task('clean:public/themes', function () {
return gulp.src(path.resolve(__dirname, 'public/themes'))
.pipe(clean().on('error', gutil.log));
});
@tlimpanont
tlimpanont / README.md
Last active April 20, 2016 06:48
Het consumeren van npm theme project door een Web Applicatie

@import

Het kunnen consumeren met @import 'node_modules/theme-name/theme-name-entry';

static file servers met eventuele API endpint

Het kunnnen consumeren via http(s) static file server

http://someserver.com/css/theme-name.css

voorbeeld van theme API https://bootswatch.com/api/3.json
@tlimpanont
tlimpanont / index.html
Created March 14, 2016 19:15
This example answers the question: "Which markers (points), are positioned in the drawn polygons?"
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="which points are in the polygons?">
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<link href="https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/master/leaflet.css" rel="stylesheet" type="text/css" />
<script src="https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/master/leaflet.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/0.2.3/leaflet.draw.css">
@tlimpanont
tlimpanont / index.html
Created March 14, 2016 19:15
This example answers the question: "Which markers (points), are positioned in the drawn polygons?"
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="which points are in the polygons?">
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<link href="https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/master/leaflet.css" rel="stylesheet" type="text/css" />
<script src="https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/master/leaflet.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/0.2.3/leaflet.draw.css">
@tlimpanont
tlimpanont / DOM.js
Last active July 5, 2016 13:33
collapsible grid content blocks
var toggleClass = function(el, className) {
if (el.classList) {
el.classList.toggle(className);
} else {
var classes = el.className.split(' ');
var existingIndex = classes.indexOf(className);
if (existingIndex >= 0)
classes.splice(existingIndex, 1);
else
@tlimpanont
tlimpanont / .eslintrc
Last active April 9, 2018 18:33
my best practices .eslintrc options, also including babel-es6 features
{
// http://eslint.org/docs/rules/
"parser": "babel-eslint",
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@tlimpanont
tlimpanont / source.js
Created January 6, 2016 21:03
check if object has some value filled
isFilledWithValue = function(object) {
for(var key in object) {
var value = object[key].trim();
if(value || value.length > 0) {
return true;
}
}
return false;
}