First, install the Sass, Font Awesome, bootstrap(and deps) package:
cd assets
- npm install --save-dev sass-brunch
- npm install --save font-awesome
| # to run: | |
| # > elixir --no-halt udp_server.exs | |
| # to test: | |
| # > echo "hello world" | nc -u -w0 localhost 2052 | |
| # > echo "quit" | nc -u -w0 localhost 2052 | |
| # Let's call our module "UDPServer" | |
| defmodule UDPServer do | |
| # Our module is going to use the DSL (Domain Specific Language) for Gen(eric) Servers | |
| use GenServer |
| def download_zip(image_list) | |
| unless image_list.blank? | |
| file_name = 'pictures.zip' | |
| stringio = Zip::ZipOutputStream::write_buffer do |z| | |
| image_list.each do |img| | |
| title = img.title | |
| title += '.jpg' unless title.end_with?('.jpg') | |
| z.put_next_entry(title) |
| defmodule LocationService.Daterange do | |
| @behaviour Ecto.Type | |
| def type, do: :daterange | |
| def cast([lower, upper]) do | |
| {:ok, [lower, upper]} | |
| end | |
| def cast(_), do: :error |
| /* | |
| If you want entries on a Google form to auto-create a Trello card, | |
| you can follow the steps below. | |
| There are two ways to connect a Google form to a Trello board. One of them | |
| involves using the Trello API. This version instead works by sending an email to a | |
| Trello board's private email address and then it creates cards based off the content | |
| of the email. | |
| Trello will make a card with a title that matches the "subject" line of the |
Along with deciphering if applicants have the right experience, hiring managers also have to determine if they fit well with the team culturally.
| var zip = new JSZip(); | |
| var count = 0; | |
| var zipFilename = "zipFilename.zip"; | |
| var urls = [ | |
| 'http://image-url-1', | |
| 'http://image-url-2', | |
| 'http://image-url-3' | |
| ]; | |
| urls.forEach(function(url){ |
| background: linear-gradient(270deg, #28b691, #d0b93c); | |
| background-size: 400% 400%; | |
| -webkit-animation: AnimationName 33s ease infinite; | |
| -moz-animation: AnimationName 33s ease infinite; | |
| -o-animation: AnimationName 33s ease infinite; | |
| animation: AnimationName 33s ease infinite; | |
| @-webkit-keyframes AnimationName { | |
| 0%{background-position:0% 50%} | |
| 50%{background-position:100% 50%} | |
| 100%{background-position:0% 50%} |
Relevant Rails PRs
h/t to http://juanitofatas.com/2015/01/31/rails-5-active-record-or/ for some more useful links