Skip to content

Instantly share code, notes, and snippets.

View igoventura's full-sized avatar
🎯
Focusing

Igo Ventura igoventura

🎯
Focusing
View GitHub Profile
class AsyncInjector {
constructor() {}
injectScript(
document: any,
src: string,
async: boolean = false,
callbackLoaded = () => {}
) {
let script = document.createElement("script");
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Teste 001</title>
<link rel="stylesheet" href="styles.css">
@igoventura
igoventura / array-map-uppercase.js
Last active July 10, 2019 15:12
Object Array to Uppercase
Object.prototype.keys = function() { return Object.keys(this) }
var a = [{nome: 'igo', sobrenome: 'ventura'}, {nome: 'igo', sobrenome: 'ventura'}, {nome: 'igo', sobrenome: 'ventura'}]
a.map(i => { i.keys().forEach(k => i[k] = i[k].toUpperCase()); return i })
@igoventura
igoventura / DbDataReader`.cs
Created July 26, 2019 21:05
Map sql query c#
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Reflection;
namespace EFCore.ProceduresSchema.Extensions
{
// ReSharper disable once InconsistentNaming
public static class DbDataReader_
@igoventura
igoventura / localStorage.js
Created August 1, 2019 04:54
Cookie as localstorage
if (!window.localStorage) {
Object.defineProperty(window, "localStorage", new (function () {
var aKeys = [], oStorage = {};
Object.defineProperty(oStorage, "getItem", {
value: function (sKey) { return sKey ? this[sKey] : null; },
writable: false,
configurable: false,
enumerable: false
});
Object.defineProperty(oStorage, "key", {
import java.math.BigDecimal;
public class DistanceCalculator {
/**
* Calculates distance between to points and returns in meters.
*
* @param latitude1
* @param longitude1
* @param latitude2
@igoventura
igoventura / SketchSystems.spec
Created February 11, 2020 21:18
My Awesome Sketch
My Awesome Sketch
First State
some event -> Second State
Second State
goto third -> Another Sketch
Another Sketch
Third state -> My Awesome Sketch
@igoventura
igoventura / tutorial_docker_dotnet310.md
Last active March 26, 2020 03:24
Tutorial dockerfile dotnet core