Skip to content

Instantly share code, notes, and snippets.

View raul782's full-sized avatar

Raul Rodriguez raul782

View GitHub Profile

Advance the support of Scala.js in Dotty, a tutorial

Dotty contains preliminary support for Scala.js under the flag -scalajs. Or rather, it contains the infrastructure for preliminary support. It is far from being actually usable, but this is where you can help!

This small tutorial walks you through a few steps that you can do to further the support of Scala.js in Dotty. Even if you do not typically contribute to a compiler, this can be your chance. It is not very difficult, given that there already exists an extensive test suite, as well as a working implementation for scalac.

@raul782
raul782 / streams-tutorial.md
Created November 14, 2019 19:32 — forked from djspiewak/streams-tutorial.md
Introduction to scalaz-stream

Introduction to scalaz-stream

Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.

The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca

@raul782
raul782 / querystring.swift
Created October 12, 2018 21:56 — forked from gillesdemey/querystring.swift
Retrieve specific query string parameter from NSURL
func getQueryStringParameter(url: String, param: String) -> String? {
let url = NSURLComponents(string: url)!
return
(url.queryItems? as [NSURLQueryItem])
.filter({ (item) in item.name == param }).first?
.value()
}

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version

brew install mysql

@raul782
raul782 / MySQL_macOS_Sierra.md
Created July 21, 2018 00:46 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@raul782
raul782 / scala unwrap collection
Created December 7, 2017 21:00 — forked from tommilimmot/scala unwrap collection
scala: pass List/Collection of arguments to Function with argument type (String, String) *, such as play.api.libs.ws.WS.WSRequestHolder.withQueryString()
val argumentList = List("arg1"->"val1", "arg2"->"val2", "arg3"->"val3")
// repl> argumentList: List[(String, String)] = List((arg1,val1), (arg2,val2), (arg3,val3))
// from play 2.1 scala api
// def withQueryString(parameters: (String, String)*): WSRequestHolder
// can't pass List[(String, String)] to function because it expects type (String, String)
// unwrap collection (List) with : _*
play.api.libs.ws.WS.url("http://localhost").withQueryString(argumentList : _*).get
@raul782
raul782 / sql-mongo_comparison.md
Created September 1, 2017 15:46 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@raul782
raul782 / .travis.yml
Created December 13, 2015 23:11
Testing Scala programs with Travis CI on OS X
language: java
env:
- SCALA_VERSION=2.11.7
os:
- osx
script:
- ./sbt "++$SCALA_VERSION" test
matrix:
include:
- env: SCALA_VERSION=2.11.7
@raul782
raul782 / gist:c31328b99c6adfb81f45
Created November 30, 2015 00:26 — forked from mlhales/gist:5785725
Install OpenCV with Nvidia CUDA, and Homebrew Python support on the Mac.

#OpenCV on the Mac with Nvidia CUDA and Python support using Homebrew

##Prerequisites

  • XCode
  • CUDA
  • Homebrew
    • CMake
    • GCC 4.5+
  • Python
(function () {
var scheme = (("https:" == document.location.protocol) ? "https" : "http");
var adnxs_domain = 'secure.adnxs.com';
var aol_domain = 'secure.leadback.advertising.com';
var rule = ["*", "*"];
if (scheme=='http') { adnxs_domain = 'ib.adnxs.com'; aol_domain = 'leadback.advertising.com';}
var el = document.createElement("div");
el.style["width"] = "1px";
el.style["height"] = "1px";
el.style["display"] = "inline";