Mix.install([
{:plug_cowboy, "> 0.0.0"},
{:jason, "> 0.0.0"},
{:httpoison, "> 0.0.0"}
])| @default_timeout 100 | |
| @check_interval 10 | |
| # Test Helpers | |
| defp wait_for(fun, timeout \\ @default_timeout) do | |
| start_time = System.monotonic_time(:millisecond) | |
| ref = make_ref() | |
| try do |
Let's say contributor has submitted a pull request to your (author) project (repo). They have made changes on their
branch feature and have proposed to merge this into origin/master, where
origin -> https://github.com/author/repo.gitNow say you would like to make commits to their PR and push those changes. First, add their fork as a remote called
| https://colab.research.google.com/notebook#fileId=0B......&offline=true&sandboxMode=true | |
| # or in the new url format | |
| https://colab.research.google.com/drive/1kHE...#offline=true&sandboxMode=true |
| # tested on macOS 10.12.4 | |
| # based on https://elixirforum.com/t/how-to-change-a-phoenix-project-name-smoothly/1217/6 | |
| # replace values as necessary | |
| current_otp="hello_phoenix" | |
| current_name="HelloPhoenix" | |
| new_otp="" | |
| new_name="" | |
| git grep -l $current_otp | xargs sed -i '' -e 's/'$current_otp'/'$new_otp'/g' |
If you are reading this, you probably tried to write code like this
test "testing session" do
build_conn()
|> put_session(:user_id, 234)
|> get("/")
...
endAnd got this exception:
| <%# Put this code snippet between the <head></head>-tags in your application layout and %> | |
| <%# replace 'UA-XXXXXXXX-X' with your own unique Google Analytics Tracking ID %> | |
| <%# ... %> | |
| <head> | |
| <%# ... %> | |
| <% if Rails.env.production? %> | |
| <script type="text/javascript"> | |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| #!/usr/bin/env bash | |
| URL="http://localhost:15672/cli/rabbitmqadmin" | |
| VHOST="<>" | |
| USER="<>" | |
| PWD="<>" | |
| QUEUE="<>" | |
| FAILED_QUEUE="<>" |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
| require 'csv' | |
| require 'twitter' | |
| def twitter_client | |
| @twitter_client ||= Twitter::REST::Client.new do |config| | |
| config.consumer_key = 'XXXXXX' | |
| config.consumer_secret = 'XXXXXX' | |
| config.access_token = 'XXXXXX' | |
| config.access_token_secret = 'XXXXXX' | |
| end |