Skip to content

Instantly share code, notes, and snippets.

View fmontes's full-sized avatar
🎯
Focusing

Freddy Montes fmontes

🎯
Focusing
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Redux examples">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://wzrd.in/standalone/expect@latest"></script>
<script src="https://wzrd.in/standalone/deep-freeze@latest"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.5.2/redux.js"></script>

9431 --> 5

Porque hay que manejar los eventos y nunca lo hemos hecho, asi que hacerlo bien puede llevar tiempo de research y pruebas.

<md-select ... events>
  <md-option value="xxx"></md-option>
</md-select>

Son como 2 componentes en 1.

Net Uptime Monitor Failure Log (NetUptimeMonitor.com)
UNLICENSED TRIAL VERSION
=======================================
2/12/2017 9:42:35 AM Log Start
---------------------------------------
Failure Start Length
2/12/2017 9:48:24 AM 0:00:06
2/12/2017 9:48:39 AM 0:00:06
2/12/2017 8:55:47 AM 0:00:06
@fmontes
fmontes / pre-push.sh
Created August 23, 2017 20:13
Githook to run the test before push
#!/bin/sh
red="\033[0;31m"
yellow="\033[1;33m"
green="\033[1;32m"
reset="\033[0m"
# now if your "package.json" isn't in the root directory
# just "cd" there
# eg.
# cd folder/with/my-package
@fmontes
fmontes / upgrade-dojo.md
Last active December 16, 2017 13:04
Upgrade dojo in DotCMS

Upgrade Dojo in DotCMS

What you need?

  1. A terminal
  2. NodeJS

How to know which version of dojo we are

  1. Open DotCMS backend
  2. Open the browser console and make sure you are in the iframe
<Context path="${catalina.home}/webapps/ROOT" docBase="${catalina.home}/webapps/ROOT" reloadable="false" crossContext="true">
<JarScanner scanBootstrapClassPath="false" scanClassPath="false">
<JarScanFilter tldSkip="*.jar" pluggabilitySkip="*.jar"/>
</JarScanner>
<Resources allowLinking="true" />
<!--
The class loader behaviour changed on recent tomcat versions, with the new default behaviour
we are unable to set a -javaagent and with that we won't be able to use instrumentation, setting the
delegate to true will restored the loader behaviour.
"Set to true if you want the class loader to follow the standard Java2 delegation model,
@fmontes
fmontes / find_replace.js
Created August 23, 2018 18:15
Find and replace text in a webpage
// Find all the existence of a text:
var headings = document.evaluate("//h4[contains(., 'String of text')]", document, null, XPathResult.ANY_TYPE, null );
// Get one element
var el = headings.iterateNext();
// Replace the text
el.innerText = 'New text'

Keybase proof

I hereby claim:

  • I am fmontes on github.
  • I am fmontes (https://keybase.io/fmontes) on keybase.
  • I have a public key ASDXVnioW1NCen6RxtgYVAeFYt3WR9g8_YMeR8ucc8T7bAo

To claim this, I am signing this object:

[
{
"divider": {
"clazz": "com.dotcms.contenttype.model.field.ImmutableRowField",
"fieldContentTypeProperties": [],
"dataType": "SYSTEM",
"searchable": false,
"unique": false,
"indexed": false,
"listed": false,
@fmontes
fmontes / face-mock.ts
Last active August 24, 2019 17:54
Model for my Angular Face Recognition Workshop
face: Face = {
attributes: {
emotion: {
sadness: 2.604,
neutral: 0.004,
disgust: 0.355,
anger: 0.001,
surprise: 0.004,
fear: 0.001,
happiness: 97.032