| #!/usr/bin/sudo sh | |
| ## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+. | |
| ## From `strings ruby_concealer.so`: | |
| ## | |
| ## > This obfuscation is intended to discourage GitHub Enterprise customers | |
| ## > from making modifications to the VM. | |
| ## | |
| ## Well, good, as long as its not intended to discourage *me* from doing this! |
| defmodule Episode do | |
| defstruct id: nil, name: nil, video: nil, markdown: nil, post: nil | |
| def list do | |
| [ | |
| %Episode{id: "001", post: "271", name: "Introduction and Installing Elixir", video: "1366", markdown: "1382" }, | |
| %Episode{id: "002", post: "275", name: "Basic Elixir", video: "1367", markdown: "1357" }, | |
| %Episode{id: "003", post: "280", name: "Pattern Matching", video: "14879", markdown: "1413" }, | |
| %Episode{id: "004", post: "284", name: "Functions", video: "5086", markdown: "1559" }, | |
| %Episode{id: "005", post: "298", name: "Mix and Modules", video: "5087", markdown: "1654" }, |
- Must be an event that someone involved in open source would be interested in attending
- Must be a community oriented event (no corporate owned for-profit events here please)
- Can't be about a specific language/framework.
Leave suggestions in the comments below
| import argparse | |
| import os, os.path | |
| import zipfile | |
| import io | |
| def readui32(file): | |
| bytes = file.read(4) | |
| number = bytes[0] | |
| number += bytes[1] << 8 | |
| number += bytes[2] << 16 |
| openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
| chmod 600 id_rsa.pem |
- architecture was always:
- box - box - cylinder
- then layers:
- ideally:
| import com.twitter.algebird.{Aggregator, Semigroup} | |
| import com.twitter.scalding._ | |
| import scala.util.Random | |
| /** | |
| * This job is a tutorial of sorts for scalding's Execution[T] abstraction. | |
| * It is a simple implementation of Lloyd's algorithm for k-means on 2D data. | |
| * | |
| * http://en.wikipedia.org/wiki/K-means_clustering |
The thing that students have the hardest time on when learning functional programming is how to process a recursive structure while maintaining some sort of "state", the result if you will. I'll attempt here to demystify the process.
Functional programming languages almost always use a lot of recursively defined structures. Depending on the language those can be implemented in various ways, but in any case the end result is the same. A structure of this type is either an "atom", i.e. an irreducible thing, or a "compound" consisting of substructures of the same form.
For example a "list" is either an Empty/Nil list (the "atom") or it is formed as a Cons of a value and another list (compound form). That other "sublist" can itself be empty or another cons and so on and so forth. A tree is similar. It is either empty, or it consists of a triple of a value and two sub-trees, left and right.
Almost every problem we encounter is a question about doing something with all entries in a structure. To solve these prob