Skip to content

Instantly share code, notes, and snippets.

View ivan-marquez's full-sized avatar

Jose Ivan Marquez ivan-marquez

View GitHub Profile
@ivan-marquez
ivan-marquez / framework-sizes.md
Created February 26, 2021 12:54 — forked from Restuta/framework-sizes.md
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@ivan-marquez
ivan-marquez / terminal-keybind.ahk
Created January 15, 2021 00:08 — forked from atruskie/terminal-keybind.ahk
AutoHotkey script to bind Win+~ keyboard shortcut to Windows Terminal
#NoEnv
#SingleInstance force
SendMode Input
DetectHiddenWindows, on
SetWinDelay, 0
#`::
terminal := WinExist("ahk_exe WindowsTerminal.exe")
if (terminal)
{
@ivan-marquez
ivan-marquez / BabylonjsVisual.ts
Created December 6, 2020 02:24 — forked from AndyCross/BabylonjsVisual.ts
Use BabylonJS in PowerBI
declare module BABYLON {
export class Engine {
constructor(canvas:HTMLElement, antialias:boolean);
runRenderLoop(it:any);
resize();
}
export class Scene {
constructor(engine:Engine);
render();
}
@ivan-marquez
ivan-marquez / user_test.go
Created September 8, 2019 01:01 — forked from wrunk/user_test.go
Golang unit test for panic scenario
func TestUserFail(t *testing.T) {
func() {
defer func() {
if r := recover(); r == nil {
t.Errorf("TestUserFail should have panicked!")
}
}()
// This function should cause a panic
CreateUser(12, "hello")
@ivan-marquez
ivan-marquez / reactor.js
Created October 22, 2018 14:56 — forked from mohsen1/reactor.js
Reactor Pattern in JavaScript
function Event(name){
this.name = name;
this.callbacks = [];
}
Event.prototype.registerCallback = function(callback){
this.callbacks.push(callback);
}
function Reactor(){
this.events = {};
@ivan-marquez
ivan-marquez / npm-cheat-sheet.md
Created August 12, 2016 19:12 — forked from AvnerCohen/npm-cheat-sheet.md
Node.js - npm Cheat Sheet

Node.js - npm Cheat Sheet

(Full description and list of commands at - https://npmjs.org/doc/index.html)

##List of less common (however useful) NPM commands

######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:

@ivan-marquez
ivan-marquez / CreatedAndModifiedDateInterceptor.cs
Created April 14, 2016 03:01 — forked from marisks/CreatedAndModifiedDateInterceptor.cs
Entity Framework soft delete, modiefied and created date interceptors
using System;
using System.Data.Entity.Core.Common.CommandTrees;
using System.Data.Entity.Core.Metadata.Edm;
using System.Data.Entity.Infrastructure.Interception;
using System.Linq;
public class CreatedAndModifiedDateInterceptor : IDbCommandTreeInterceptor
{
public const string CreatedColumnName = "Created";
public const string ModifiedColumnName = "Modified";