git log --oneline 7de7970..master
OR
git log --oneline 7de7970..4cb34a9
Above command will give all logs between commit A and commit B including commit A and commit B.
| FILES=*.rst | |
| for f in $FILES | |
| do | |
| filename="${f%.*}" | |
| echo "Converting $f to $filename.md" | |
| `pandoc $f -f rst -t markdown -o $filename.md` | |
| done |
| #!/usr/bin/env bash | |
| # https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
| # https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
| # https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
| # https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
| # https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
| # https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
| # Versions | |
| CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
git log --oneline 7de7970..master
OR
git log --oneline 7de7970..4cb34a9
Above command will give all logs between commit A and commit B including commit A and commit B.
Though we're focused more on server setup procedure in this document, I will still give a very brief explanation in laymen terms for ELK. To those who are starting new in this stack, must have already heard of MVC (Model View Controller), so take it like this:
=> Elasticsearch (for Storage, Indexing & Search)=> Kibana (for DataViz & G-Man, yeah the one in half life 😏)=> Logstash (For Logs & Filtering)| import os | |
| import io | |
| from PIL import Image | |
| from django.core.urlresolvers import reverse | |
| from django.conf import settings | |
| from rest_framework import status | |
| from rest_framework.test import APITestCase |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
| # -*- coding: utf-8 -*- | |
| """ | |
| Search features for : | |
| * :mod:`elasticsearch.elasticsearch` | |
| * :mod:`haystack:haystack` | |
| * :mod:`elasticstack:elasticstack` | |
| :creationdate: 05/11/15 15:05 | |
| :moduleauthor: François GUÉRIN <[email protected]> |
| echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z |
With this tip, kibana can't be modified. So you can share the uri to anyone on the internet. It's a network method to protect kibana from changes of anonymous.
apt-get install nginx/etc/nginx/sites-available, create a new file and edit it, for example : vi /etc/nginx/sites-available/kibana-readonly
| """ | |
| From http://harkablog.com/inside-the-django-orm-aggregates.html | |
| with a couple of fixes. | |
| Usage: MyModel.objects.all().annotate(new_attribute=Concat('related__attribute', separator=':') | |
| """ | |
| from django.db.models import Aggregate | |
| from django.db.models.sql.aggregates import Aggregate as SQLAggregate |