Skip to content

Instantly share code, notes, and snippets.

View revuls's full-sized avatar

Cesar Redondo revuls

View GitHub Profile
@revuls
revuls / morse.java
Last active November 20, 2023 21:26
Morse
// Java
private static final Map<Character, String> morseMap = new HashMap<>();
static {
morseMap.put('A', ".-");
morseMap.put('B', "-...");
morseMap.put('C', "-.-.");
morseMap.put('D', "-..");
morseMap.put('E', ".");
morseMap.put('F', "..-.");
morseMap.put('G', "--.");
@revuls
revuls / reset.scss
Last active October 9, 2015 18:04 — forked from HamptonMakes/reset.scss
Meyer Reset SCSS + Box-sizing
/* 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,
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel
@revuls
revuls / reset.sass
Last active August 29, 2015 14:27 — forked from trey/reset.sass
Eric Meyer's reset.css in Sass. Originally by @postpostmodern.
/* 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,
@revuls
revuls / Sass Structure
Last active August 29, 2015 13:57
Sass scss structure for future projects and a possible styling framework
sass/
|
|– 01-elements/
| |– _globals.scss # All the colors, Animations
| |– _fonts.scss # Reset/normalize
| |– _texts.scss # Typography rules
| |– _lists.scss # Lists
| |– _images.scss # Images
| |– _forms.scss # Forms
| |– _buttons.scss # Buttons
@revuls
revuls / Util.js
Last active December 25, 2015 19:59
Util.js is a class with the most common Util methods in javascript and jQuery
Util = {
/**
* Highlight part of the text
* @param {String} s
* @param {String} t
* @return {String} highlighted text
*/
Highlight: function (s, t) {
var matcher = new RegExp("(" + $.ui.autocomplete.escapeRegex(t) + ")", "ig");
return s.replace(matcher, "<strong>$1</strong>");