Skip to content

Instantly share code, notes, and snippets.

View eksperimental's full-sized avatar

Eksperimental eksperimental

  • Available for hire
  • Remote
View GitHub Profile
@eksperimental
eksperimental / words.no_uppercase.no_numbers.non_english.missing.stats
Created April 9, 2015 10:37
rla-es missing words from Wikipedia in Spanish, excluding English words
#Position Matches Frequency Top_% Word
610 50724 7096 59.23 hab
1367 24231 14855 66.39 cápita
1618 20900 17223 67.96 von
1667 20374 17667 68.25 msnm
2692 12581 28611 72.77 du
2863 11774 30572 73.35 br
3334 10164 35414 74.78 tribus
3484 9748 36926 75.19 desambiguación
3588 9436 38147 75.47 der
defmacro is_regex(term) do
quote do
is_tuple(unquote(Macro.escape term)) and (
(elem(unquote(Macro.escape term), 0) in [:sigil_r, :sigil_R, :r, :R]) or
(elem( elem(unquote(Macro.escape term), 2), 0 ) == {:__struct__, Regex})
)
end
end
@eksperimental
eksperimental / gist:88596033712d90520a97
Last active August 29, 2015 14:17
Variable assign after regex run
get_number = fn (text) ->
case Regex.run(~r/\w (\d+)/, text) do
[_, number] -> number
_ -> nil
end
end
"10" = _number = get_number.("a 10")
nil = _number = get_number.("a NO")
@eksperimental
eksperimental / Contributing improvements or bug fixes
Last active August 29, 2015 14:15
elixir-lang instructions
1) **Fork and Clone this Repository**
[Fork this repository](https://github.com/elixir-lang/elixir-lang.github.com/fork), and Create a local clone of your fork. You may want to read the [Instructions on how to do that](https://help.github.com/articles/fork-a-repo/).
2) **Install [Ruby](https://www.ruby-lang.org/)**
To setup a development enviroment locally, you need to have Ruby installed. If you are running a Mac, it's probably installed. Run in your shell `ruby --version`. Your Ruby version should begin with `1.9.3` or `2.0.0`. You can follow [this guide](https://www.ruby-lang.org/en/documentation/installation/) if you need to install it.
3) **Install [Bundler](http://bundler.io/)**
```bash
gem install bundler
```
@eksperimental
eksperimental / getting_started
Last active August 29, 2015 14:14
Getting Started Guide: Structure
- title: Getting Started
dir: /getting_started/
pages:
- title: Introduction
slug: introduction
- title: Basic types
slug: basic_types
- title: Basic operators
@eksperimental
eksperimental / string.ex
Created October 31, 2014 14:53
this one will give no warning
import Kernel, except: [length: 1]
defmodule String do
@moduledoc ~S"""
A String in Elixir is a UTF-8 encoded binary.
## Codepoints and graphemes
The functions in this module act according to the Unicode
Standard, version 6.3.0. As per the standard, a codepoint is
import Kernel, except: [length: 1]
defmodule String do
@moduledoc ~S"""
A String in Elixir is a UTF-8 encoded binary.
## Codepoints and graphemes
The functions in this module act according to the Unicode
Standard, version 6.3.0. As per the standard, a codepoint is