Skip to content

Instantly share code, notes, and snippets.

View makefile
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=mybinary
BINARY_UNIX=$(BINARY_NAME)_unix
@halyph
halyph / gist:53aff19609d3555abeec3fa8334f68ae
Created Nov 20, 2017 — forked from graffic/gist:6c15f8c2b4f0f208939e
Uncle bob "Framework Whipped" original post
View gist:53aff19609d3555abeec3fa8334f68ae

Framework Whipped

Uncle Bob 11 May 2014 Craftsmanship Frameworks are powerful tools. We'd be lost without them. But there's a cost to using them.

The relationship between a programmer and a framework is similar to the relationship between an executive and an administrative assistant. The framework takes care of all the necessary details, so that the executive can focus on high level decisions.

Think of Rails, or Spring, or JSF, or Hibernate. Think about what writing a web system would be like without these frameworks to help you. The idea is disheartening. There'd be so many little piddling details to deal with. It'd be like endeavoring to construct a mnemonic memory circuit using stone knives and bearskins[1].

And so we gleefully use those glittering frameworks. We joyously intermingle our code with the frameworks' in anticipation of all the benefits they promise. We make the mistake that so many executives have made before us. We marry our secretary.

@halyph
halyph / PropertyTests.scala
Created Jun 6, 2017 — forked from davidallsopp/PropertyTests.scala
Examples of writing mixed unit/property-based (ScalaTest with ScalaCheck) tests. Includes tables and generators as well as 'traditional' tests.
View PropertyTests.scala
/**
* Examples of writing mixed unit/property-based (ScalaCheck) tests.
*
* Includes tables and generators as well as 'traditional' tests.
*
* @see http://www.scalatest.org/user_guide/selecting_a_style
* @see http://www.scalatest.org/user_guide/property_based_testing
*/
import org.scalatest._
@halyph
halyph / history.txt
Created Nov 22, 2016 — forked from unak/history.txt
The History of Ruby
View history.txt
* Only the releases of the stable versions are enumerated in principle. The releases of the unstable versions especially considered to be important are indicated as "not stable."
* The branches used as the source of each releases are specified, and the branching timing of them are also shown. BTW, before subversionizing of the repository, the term called "trunk" was not used, but this list uses it in order to avoid confusion.
* In order to show a historical backdrop, big conferences (RubyKaigi, RubyConf and Euruko) are also emurated. About the venues of such conferences, general English notations are adopted, in my hope.
* ruby_1_8_7 branch was recut from v1_8_7 tag after the 1.8.7 release becaouse of an accident.
* 1.2.1 release was canceled once, and the 2nd release called "repack" was performed. Although there were other examples similar to this, since the re-releases were performed during the same day, it does not write clearly in particular.
* Since 1.0 was released with the date in large quantities,
@halyph
halyph / PomToSbt.scala
Created Sep 14, 2016 — forked from mslinn/PomToSbt.scala
Convert pom.xml to build.sbt
View PomToSbt.scala
import scala.xml._
// To convert a Maven pom.xml to build.sbt:
// 1) Place this code into a file called PomToSbt.scala next to pom.xml
// 2) Type scala PomtoSbt.scala > build.sbt
// The dependencies from pom.xml will be extracted and place into a complete build.sbt file
// Because most pom.xml files only refernence non-Scala dependencies, I did not use %%
val lines = (XML.load("pom.xml") \\ "dependencies") \ "dependency" map { dependency =>
val groupId = (dependency \ "groupId").text
val artifactId = (dependency \ "artifactId").text
@halyph
halyph / .bash_profile
Created Jul 27, 2016 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@halyph
halyph / .bash_profile
Created Jul 27, 2016 — forked from stephenll/.bash_profile
.bash_profile file on Mac OS X
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
@halyph
halyph / API.md
Created Apr 11, 2016 — forked from iros/API.md
Documenting your REST API
View API.md

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@halyph
halyph / .gitignore
Created Mar 18, 2016 — forked from karmi/.gitignore
Elasticat makes Elasticsearch JSON responses pretty • http://git.io/elasticat
View .gitignore
.DS_Store
tmp/
@halyph
halyph / golang_package_management.md
Created Jan 16, 2016 — forked from diyan/golang_package_management.md
Cambrian explosion of Golang package management tools
View golang_package_management.md
Most starred tools that supports GO15VENDOREXPERIMENT

godep, glide, govendor, gvt

Most starred tools that does not supports GO15VENDOREXPERIMENT

gb, gom, gpm, gopm, goop, nut, johnny-deps, gopkg, gopack, gigo

GitHub stats at 2016-01-02
repo                   	stars	forks	lang
tools/godep            	2954 	263  	Go
You can’t perform that action at this time.