Skip to content

Instantly share code, notes, and snippets.

View dgtlmonk's full-sized avatar
💭
We first make our habits, and then our habits make us.

dgtlmonk dgtlmonk

💭
We first make our habits, and then our habits make us.
View GitHub Profile
@dgtlmonk
dgtlmonk / debounce-hook.js
Created January 21, 2020 09:45
debounce hoooks
import React, { useState, useEffect } from 'react';
// Our hook
export default function useDebounce(value, delay) {
// State and setters for debounced value
const [debouncedValue, setDebouncedValue] = useState(value);
useEffect(
() => {
// Set debouncedValue to value (passed in) after the specified delay
@dgtlmonk
dgtlmonk / qunit-verifySteps
Created May 27, 2019 05:07
ember-qunit - Testing that actions don't fire
test('a button does not fire when disabled', async function(assert) {
let myAction = function() {
assert.step('button clicked');
};
this.set('myAction', myAction);
await render(hbs`{{#ui-button onClick=(action myAction) disabled=true}}my button{{/ui-button}}`);
await click('button');
assert.verifySteps([]);
Application Title: ShoutBux
Description: A twitter like application that lets you post a “shout”(with a max character limit) to your timeline.
Specs:
1. Must be written in NodeJS frameworks (expressJS, meteorJS etc).
2. Must have its own Repository(GitHub, BitBucket etc).
3. Must have testing.
4. Must use Database storage(MySQL, sqLite or MongoDB etc).
5. A README file that contains the information about the application and the steps on how to run it.
6. Must have a high level app design structure diagram. (Important!)
1. Data Fetching and Rendering column field in proper order, state (visible/hidden) and width sync with v4.
** task involves
a. Updating and refactoring of old v5 Grid (Jayson's version) and integration to the new DataGrid architecture (ON GOING)
b. Custom Service to read data from server (SOC) (DONE)
c. Custom routine to re-map and re-order the new data into DataGrid Configuration (will vary depending on grid type e.g. all contacts, person, company, etc... but will code ) (ON GOING)
d. Custom routine to rebuild Column menu real-time as the data and configuration changes. (ON GOING)
e. Custom routien to Load and Parse v4 Field Configuration settings (column width and states) (ON GOING)
f. Rendering DataGrid based on the updated Configuration/Mappings (ON GOING)
g. Rebuild Column menu (ON GOING)
------------------------------------------------------------------------------------------------------
BaseEntityClass = function(_entityId) {
//
this.EntityId = _entityId;
}
BaseEntityClass.prototype.getEntityType = function() {
return "I'm an entity Type";
}
BaseEntityClass.prototype.getEntityId = function() {
----------------
Comparison
----------------
http://responsive.vermilion.com/compare.php
Tools ---
http://websymphony.net/almost-flat-ui/ - flat ui
Media Queries - http://foundation.zurb.com/docs/media-queries.html - IMPORTANT
" Vim color file
" Maintainer: Daniel Bolton <danielbarrettbolton@gmail.com>
" Last Modified: 2010-07-04
" Version: 0.1
"
" This scheme is based on the excellent lucius scheme. The cfterm colors are
" in fact exactly the same, and exist simply because I was too lazy to remove
" them yet.
set background=dark
set noerrorbells visualbell t_vb=
execute pathogen#infect()
syntax enable
filetype plugin indent on
set nobackup
set noswapfile
map <F8> :so ~/.vimrc.local <CR>
map <S-w> :NERDTreeToggle <CR>
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
CoffeeScript JavaScript
is ===
isnt !==
not !
and &&
or ||
true, yes, on true
false, no, off false
@, this this
of in