Skip to content

Commit

Permalink
Remove ads
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkadwill committed Jan 22, 2018
1 parent 533dcc5 commit a53adb6
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 26 deletions.
10 changes: 0 additions & 10 deletions _includes/advertisements.html

This file was deleted.

2 changes: 0 additions & 2 deletions _posts/2017-11-30-a-new-blog.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ In this blog I intend to write about all things tech. Where my last blog was pre

I hope some people will find this content useful and I hope this blog has a longer life than the last!

{% include advertisements.html %}

[kadwill-com]: https://kadwill.com
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,3 @@ If you are working through these steps yourself then you can run the following c
```
SELECT * FROM pg_roles;
```

{% include advertisements.html %}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Recently I've been using Amazon's ECS service which allows developers to run Doc

After some searching I found a couple of commands to help me solve this problem.

{% include advertisements.html %}

```
$ docker ps -a
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ There are many themes available for Jekyll, allowing you to choose the look and

The `@import` line tells Jekyll to import the existing site styles. This means that you don't have to define a completely new set of site styles.

{% include advertisements.html %}

4. Now you're ready to add or modify your site's stylesheet. Just add your code under the `@import` line. Like so:

```css
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ SELECT COUNT(offers.id) AS offers_count, users.name AS user_name

As you can see, the query does not return the correct results. The query is just counting all of the offers in the database.

{% include advertisements.html %}

### Differences between MySQL and PostgreSQL
Unfortunately the story doesn't end there. There are some differences between MySQL and PostgreSQL which further complicate matters. [As this Rails issue thread explains](https://github.com/rails/rails/issues/1515), in Postgres the columns that appear in the FROM clause have to be the same ones that appear in the GROUP BY clause. This is difficult to conceptualise so I'm going to demonstrate with some more SQL.

Expand Down Expand Up @@ -156,5 +154,3 @@ SELECT COUNT(offers.id) AS offers_count, users.name AS user_name, offers.name AS
However, you'll notice that the results are not the same as results from MySQL. The only solution I've found is to re-write the query in a different way or to do some of the work in Ruby.

I hope this post helps anyone who is having issues with `#group` and `#order` in Rails.

{% include advertisements.html %}
2 changes: 0 additions & 2 deletions _posts/2017-12-29-best-tech-books-of-2017.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ Strong knowledge of SQL is very useful for backend development. Most Rails appli
On of my goals for 2018 is to learn Go-lang. I've written a few small applications with it but I've never taken the time to learn it in depth. The Little Go Book is a great introduction to Go, it's available for free and it's a quick read. The book covers Go's main features, syntax and principles. It's a great book to give you a solid foundation before going on to tackle more challenging books.

I recommend reading through this book with a laptop. Try typing out each snippet of code and getting it to run. This helps the information sink in and also starts to develop muscle memory with the new programming language.

{% include advertisements.html %}
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,3 @@ $ heroku run rake db:migrate --app production-app
### Further Reading
* [Heroku docs](https://devcenter.heroku.com/articles/git#deploying-code)
* [mentalized.net](http://mentalized.net/journal/2017/04/22/run-rails-migrations-on-heroku-deploy/)

{% include advertisements.html %}

0 comments on commit a53adb6

Please sign in to comment.