Skip to content

Instantly share code, notes, and snippets.

Diego Alvarez d1egoaz

  • Shopify
  • Vancouver - Canada
Block or report user

Report or block d1egoaz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View learning_scala.org
@d1egoaz
d1egoaz / boxstarter.ps1
Last active Oct 14, 2017 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@d1egoaz
d1egoaz / AutomateScalafmtPlugin.scala
Created Mar 13, 2017
AutomateScalafmtPlugin using local ScalafmtBootstrap
View AutomateScalafmtPlugin.scala
import org.scalafmt.sbt.ScalafmtPlugin
import sbt._
import sbt.Keys._
import sbt.inc.Analysis
object AutomateScalafmtPlugin extends AutoPlugin {
object autoImport {
def automateScalafmtFor(configurations: Configuration*): Seq[Setting[_]] =
configurations.flatMap { c =>
View ScalafmtBootstrap.scala
import java.io.OutputStreamWriter
import java.io.{ByteArrayInputStream, ByteArrayOutputStream, File, PrintStream}
import java.net.URLClassLoader
import coursier._
import org.scalafmt.Versions
import scala.collection.immutable.Nil
import scala.collection.mutable
import scala.language.reflectiveCalls
View git-mergetool-winmerge-setup.sh
#!/bin/sh
#
# This script will make WinMerge your default tool for diff and merge.
# It must run inside git bash (on Windows)
#
#
# If you experience path issues you should give a try to the gist
# created by markusobrist at https://gist.github.com/1010253
@d1egoaz
d1egoaz / pre-push-install.md
Last active Dec 10, 2015
git hook pre-push installation instructions
View pre-push-install.md
@d1egoaz
d1egoaz / pre-push
Created Dec 10, 2015
Scala pre-push git hook that compiles project before pushing it to git server
View pre-push
#!/bin/sh
echo ">> Executing sbt compile before pushing to Git server"
sbt compile
compiles=$?
echo ">> Compiles?"
if [ $compiles -eq 0 ]
then
echo owly
@d1egoaz
d1egoaz / inject_beanmethod_into_beanproperty.xml
Created May 9, 2012
Inyectar el resultado de un método como una propiedad de un bean en Spring
View inject_beanmethod_into_beanproperty.xml
<bean id="miDataSourceProvider" class="com.algunnamespace.sql.DataSourceProvider">
</bean>
<bean id="miclaseDao" class="com.d1egoaz.misuperproyecto.dao.MiclaseDaoImpl">
<property name="jdbcDataSource">
<bean factory-bean="miDataSourceProvider" factory-method="getDataSource" />
</property>
</bean>
@d1egoaz
d1egoaz / nodeMock.js
Last active Aug 29, 2015
simple node express example
View nodeMock.js
var express = require('express');
var request = require('request');
var app = express();
app.all('*', function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
View FileEncodingTest
package scoverage
import java.nio.charset.{MalformedInputException, CodingErrorAction}
import org.scalatest.FunSuite
import scala.io.{Source, Codec}
class FileEncodingTest extends FunSuite {
You can’t perform that action at this time.