A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
To remove a submodule you need to:
| package util; | |
| import org.apache.commons.lang3.StringUtils; | |
| public class IdNumberValidator { | |
| // Invalid Result is used as a return value when the test fails | |
| private static final IdNumberValidatorResult invalid = new IdNumberValidatorResult(); | |
| public static IdNumberValidatorResult validate(String value) { |
| git checkout desired_branch // put in the name of the branch you wish to KEEP | |
| git merge -s ours branch_to_be_replaced // put in the name of the branch you want to OVERWRITE | |
| git checkout branch_to_be_replaced // put in the name of the branch you want to OVERWRITE | |
| git merge desired_branch // put in the name of the branch you wish to KEEP |
| var gulp = require('gulp'); // Require gulp | |
| // Sass dependencies | |
| var sass = require('gulp-sass'); // Compile Sass into CSS | |
| var minifyCSS = require('gulp-minify-css'); // Minify the CSS | |
| // Minification dependencies | |
| var minifyHTML = require('gulp-minify-html'); // Minify HTML | |
| var concat = require('gulp-concat'); // Join all JS files together to save space | |
| var stripDebug = require('gulp-strip-debug'); // Remove debugging stuffs |
| /** | |
| * Basic example to pass values between parent and child components in React | |
| * Seems to be in line with this | |
| * http://stackoverflow.com/questions/24147331/react-the-right-way-to-pass-form-element-state-to-sibling-parent-elements | |
| * Now I have the state in parent and child. Is that good or bad? Why would I need it in child? | |
| * Could probably take that out | |
| * */ | |
| class Parent extends React.Component { | |
| constructor(props) { | |
| super(props); |
| import * as mongoose from 'mongoose'; | |
| export let Schema = mongoose.Schema; | |
| export let ObjectId = mongoose.Schema.Types.ObjectId; | |
| export let Mixed = mongoose.Schema.Types.Mixed; | |
| export interface IHeroModel extends mongoose.Document { | |
| name: string; | |
| power: string; |
| /** | |
| * Observer pattern - simple implementation | |
| * By Michał Miszczyszyn, 2016 | |
| */ | |
| class Observer { | |
| constructor() { | |
| this.observers = []; | |
| } |
| Number.prototype.map = function (in_min, in_max, out_min, out_max) { | |
| return (this - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
| } |