Skip to content

Instantly share code, notes, and snippets.

View domix's full-sized avatar
🇲🇽

Domingo Suarez Torres domix

🇲🇽
View GitHub Profile
@domix
domix / StaticsInLocalClassesExample.java
Created September 27, 2021 15:48 — forked from thomasdarimont/StaticsInLocalClassesExample.java
Example for using static in a local class for memoization
package wb.java17;
import java.math.BigInteger;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class StaticsInLocalClassesExample {
public static void main(String[] args) {
System.out.println(factorial(120));
@domix
domix / mac-setup.md
Created July 12, 2020 02:13 — forked from todc/mac-setup.md
Fresh Mac OS Setup

1. Run Software Update

Make sure everything is up to date.

Software Update

2. Install Xcode and its "Command Line Tools"

  1. Go to App Store and install Xcode.
  2. Open and accept the terms
@domix
domix / introrx.md
Created April 25, 2016 07:00 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@domix
domix / countries.sql
Created April 19, 2016 21:52 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
#%RAML 0.8
title: World Music API
baseUri: http://example.api.com/{version}
version: v1
schemas:
- halLink: |
{ "$schema": "http://json-schema.org/schema",
"type": "object",
"description": "a Hypertext Application Language link",
@domix
domix / build.gradle
Last active August 29, 2015 14:24 — forked from cholick/build.gradle
//Minimal configuration needed for Gradle build file with GMetrics integration
apply plugin: 'groovy'
repositories {
mavenCentral()
}
configurations {
gmetrics
}
@Grab(group='com.craigburke.document', module='pdf', version='0.3.1')
@Grab(group='com.craigburke.document', module='word', version='0.3.1')
@Grab('com.bloidonia:ascii-image:1.1')
import com.bloidonia.asciiimage.AsciImageProcessor
import java.awt.image.BufferedImage
import java.awt.RenderingHints
import java.awt.Color
import javax.imageio.ImageIO
import com.craigburke.document.builder.PdfDocumentBuilder
package mongodbdemo.config;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
// This is a comparison between Haskell and Groovy based on some simple problems found in the following
// Haskell Introduction:
// http://learnyouahaskell.com/starting-out#ready-set-go
// Ex 1. If we have two lists, [2,5,10] and [8,10,11] and we want to get the products of all the possible
// combinations between numbers in those lists, here's what we'd do.
/* HASKELL */
[ x*y | x <- [2,5,10], y <- [8,10,11]]