Skip to content

Instantly share code, notes, and snippets.

@cschneid
cschneid / Elm.rake
Created December 9, 2016 18:25 — forked from coreyhaines/Elm.rake
Rake task to compile/copy elm
namespace :elm do
Apps = [ "WorkspaceMain", "ManageSubscribersMain", "NotebookMain", "ResponsesMain" ]
JsFileName = "irn_elm.js"
JsOutputDir = "app/assets/javascripts"
desc "Updates packages, compiles the Elm code and copies it to #{JsOutputDir}"
task :compile_and_copy => [:package_install, :make, :copy] do
puts "Updated Packages, Compiled and copied Elm code to #{JsOutputDir}"
end
/**
* Adapted from https://github.com/Khan/react-components/blob/master/js/timeout-transition-group.jsx
*/
var React = require('react/addons');
var ReactTransitionGroup = React.addons.TransitionGroup;
var Velocity = require('velocity-animate');
var transitions = {
// Forcefeeding: property order = [after, before]
Quick gist on getting vsphere and vcenter and fog/vsphere going
# Things to download
- Download free evaluation version of window 2008
- Download free evaluation of esxi v5
- Download free evaluation of esxi vsphere (control center) iso
# Install esxi in vmware fusion
1)Install esxi in vmware (select vmware/esx as host)
create a user root/pipopopo
# Knife Configuration File.
#
# This is a Ruby DSL to set configuration parameters for Knife's
# general options. The default location for this file is
# ~/.chef/knife.rb. If multiple Chef repositories are used,
# per-repository configuration files can be created. A per repository
# configuration file must be .chef/knife.rb in the base directory of
# the Chef repository. For example,
#
# ~/Development/chef-repo/.chef/knife.rb

I like Learn You a Haskell as a reference and cheat-sheet but I found it a little slow for learning Haskell.

Here's my recommended order for just learning Haskell:

http://www.seas.upenn.edu/~cis194/lectures.html Brent Yorgey's course is the best I've found so far and replaces both Yann Esposito's HF&H and the NICTA course. This course is particularly valuable as it will not only equip you to write Haskell but also help you understand parser combinators.

Real World Haskell is available online. (Thanks bos!)

I recommend RWH as a reference (thick book). The chapters for parsing and monads are great for getting a sense for where monads are useful. Other people have said that they've liked it a lot. Perhaps a good follow-up for practical idioms after you've got the essentials of Haskell down?

scala> import argonaut._, Argonaut._
import argonaut._
import Argonaut._
scala> Map( "foo" -> List("bar","baz") , "test" -> List() ) .jencode.spaces2
res7: String =
{
"foo" : [
"bar",
"baz"

Useful Scalac Flags

So, there have been some discussions and angry tweets recently about irritating Scala "features" (like value discarding and auto-tupling) that can actually be turned off by selecting the right compiler flag in conjunction with -Xfatal-warnings. I highly recommend a set of options something like those below.

scalacOptions ++= Seq(
  "-deprecation",           
  "-encoding", "UTF-8",       // yes, this is 2 args
  "-feature",                
 "-language:existentials",

% Title % Name % Date

My first slide

List

Average Semigroup
=================
> {-# LANGUAGE GeneralizedNewtypeDeriving #-}
>
> module Average where
>
> import Data.Semigroup
> import Data.Ratio (Ratio, (%))
@cschneid
cschneid / 0_reuse_code.js
Created January 2, 2014 20:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console