Skip to content

Instantly share code, notes, and snippets.

View mariohmol's full-sized avatar
:octocat:
lets make opensource!

Mario Mol mariohmol

:octocat:
lets make opensource!
View GitHub Profile
@mariohmol
mariohmol / arrays.js
Created April 9, 2021 16:04
Arrays min max
const data = [
{total: 10, name: 'prod A'},
{total: 20, name: 'prod B'},
{total: 30, name: 'prod C'}
]
@mariohmol
mariohmol / removal.js
Last active April 5, 2021 18:43
Twitter Scripts
function makeRandomTime(){
const x = Math.random()*2000 + 1000
console.log('Random time:',x)
return x
}
function makeDeleteLikeTimeout(){
setTimeout(() => {
runDeleteLikes();
@mariohmol
mariohmol / index.html
Created September 1, 2020 17:26
D3 Geo Maps WIth Brazil
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>App</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="me"
href="https://twitter.com/twitterdev"
@mariohmol
mariohmol / readme.md
Created May 19, 2020 23:05
bass track

hey, was just thinking about your bass recording question from a couple weeks ago and needed to take a break to relax my brain, so here's a quick shopping list/signal flow for you if you're plugging in direct to your mixer:

Bass > 1/4" cable > [SansAmp Bass DI] > XLR cable (balanced) > Channel 1 XLR input on mixer (make sure it's one with a preamp on it) > FX send from back of mixer channel > 1/4" cable > [Compressor] > 1/4" cable > Channel 2 1/4" input on mixer Keep faders on both channel 1 & 2 at 0 to start

SansAmp Bass DI

@mariohmol
mariohmol / README.md
Created July 29, 2019 19:47
angular-filter-ignoreaccents

angular-filter-ignoreaccents

A filter for angular where you pass a list of javascript objects and a string with the term to be searched, then this filter search all terms in all objects attributes.

There is a example.html with this filter working and a demo:

@mariohmol
mariohmol / node-whois.js
Created June 26, 2019 21:20
node whois example
var whois = require('node-whois')
var sys = require('sys')
var exec = require('child_process').exec;
require('dotenv').config();
const dns = require('dns');
const apiKey = process.env.nodeWhoisApiKey || "123456";
let protection=0;
@mariohmol
mariohmol / quizz.ts
Last active January 16, 2019 20:01
algorithms
class Teacher {
public name: string;
public classes: Array<StudentClass> = [];
public quizes: Array<Quiz> = [];
addClass(name) {
this.classes.push(new StudentClass(name));
}
const makeSquareAreaFromLatLng = function (lat, lng, distance = 10) {
const lat_change = distance / 111.2;
const lon_change = (Math.abs(Math.cos(lat * (Math.PI / 180)))) / 4;
const circlePoints = [];
const bounds = {
lat_min: lat - lat_change,
lon_min: lng - lon_change,
lat_max: lat + lat_change,
lon_max: lng + lon_change
@mariohmol
mariohmol / mario.js
Last active June 29, 2018 17:45
example showing created subdoc ids
#!/usr/bin/env node
'use strict';
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
const conn = mongoose.connection;
const Schema = mongoose.Schema;
const schema = new Schema({
arr: [{ type: mongoose.Schema.Types.Mixed }]
@mariohmol
mariohmol / webpack-client.config.js
Created August 29, 2017 15:51
webpack css for ssr
"use strict";
const path = require("path");
const { join, resolve } = require('path');
const loaders = require('./webpack/loaders');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');