GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.19370138645172119</real> | |
<key>Green Component</key> | |
<real>0.15575926005840302</real> |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.
Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.
As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.
Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.
// layout file | |
<body> | |
<div class="container"> | |
<%= flash_messages %> | |
<%= yield %> | |
</div><!-- /container --> | |
</body> |
# Another example for: http://onor.io/2014/03/31/partial-function-application-in-elixir/ | |
defmodule PartFuncs do | |
defp addfun(x, y), do: x + y | |
# return a partially applied function | |
def add(a), do: &addfun(a, &1) | |
# could also easily be written as: addfun(a, b) | |
def add(a, b), do: (&addfun/2).(a, b) |
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all. | |
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one. | |
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format | |
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files. | |
$ cd /tmp/ | |
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist . | |
$ plutil -convert xml1 com.googlecode.iterm2.plist | |
$ vi com.googlecode.iterm2.plist |