Skip to content

Instantly share code, notes, and snippets.

View Julianhm9612's full-sized avatar
💭
Make it happen!

Julian Henao Marin Julianhm9612

💭
Make it happen!
View GitHub Profile
*.tmp
# Word temporary
~$*.doc*
# Excel temporary
~$*.xls*
# Excel Backup File
*.xlk
@adamrecsko
adamrecsko / highlight.pipe.ts
Created May 1, 2016 20:28
Angular2 text highlight pipe
import {PipeTransform, Pipe} from 'angular2/core';
@Pipe({ name: 'highlight' })
export class HighLightPipe implements PipeTransform {
transform(text: string, [search]): string {
return search ? text.replace(new RegExp(search, 'i'), `<span class="highlight">${search}</span>`) : text;
}
}
/** Usage:
@yamionp
yamionp / locustfile.py
Last active March 27, 2025 01:51
Websocket Locust Sample. locustfile and Echo/Chat Server
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
import json
import uuid
import time
import gevent
@edysegura
edysegura / html5-validation-message.js
Last active March 27, 2025 09:41
How to prevent the browser from showing default HTML5 validation error message bubble?
document.addEventListener('invalid', (function(){
return function(e) {
//prevent the browser from showing default error bubble / hint
e.preventDefault();
// optionally fire off some custom validation handler
// myValidation();
};
})(), true);
package ejercicios;
import java.util.ArrayList;
import java.util.Random;
import java.util.Arrays;
public class Conjuntos{
private static ArrayList<String> union(ArrayList<String> primero, ArrayList<String> segundo){
ArrayList<String> retVal = new ArrayList<String>(primero);
for(String worte: segundo){
if(!primero.contains(worte))