tags
What’s the difference between the HTML width / height attribute and the CSS width / height property on the img element?
A hot debate about the subject can be found here: Width attribute for image tag versus CSS To sum it up: The gain from declaring a width value and an height value (which may not be the original physical dimensions of the image) or from css declarations (like width: [valueX]; height: [valueY];) is that it …
How to diff between git tag and branch
Thanks everyone for the leading suggestions. The issue seems to be that I didn’t have a local branch 1.4. I could achieve what I wanted (i.e. diff between the tag and the branch head on the original Git repo) in a couple of ways: Switch to it (with git checkout 1.4), then I could do …
SVN pre-commit hook for avoiding changes to tags subdirectories
I don’t have enough reputation to “comment” on Raim’s answer above, but his worked great, with one exception, his grep pattern is wrong. I simply used the below as my pre-commit hook (I didn’t have an existing one, you’d need to merge in that case): #!/bin/sh REPOS=”$1″ TXN=”$2″ SVNLOOK=/opt/local/bin/svnlook # Committing to tags is not …
How to use multiple image tags with docker-compose
I have some nice and clean solution using environment variables (bash syntax for default variable value, in my case it is latest but you can use anything ), this is my compose: version: ‘3’ services: app: build: . image: myapp-name:${version:-latest} build and push (if you need to push to the registry) with the default tag, …
git fatal:No tags can describe
I just ran into this error with git version 2.8.3 and command git describe –abbrev=0. The problem was that while the tag existed in the origin and my local repository was up to date, the tag did not have a commit message. The error was resolved after I re-tagged the commit with a tag message: …
POST vs post, GET vs get
W3C has tended towards lowercase for attribute names and values for a while. For example section 4.11 of the xhtml 1.0 standard in 2002: 4.11. Attributes with pre-defined value sets HTML 4 and XHTML both have some attributes that have pre-defined and limited sets of values (e.g. the type attribute of the input element). In …
How to set one CSS rule for two tags?
Separate the selectors with a comma: .footer #one .flag li .drop_down form div, .footer #two .flag li .drop_down form div { /* Rules */ } From the selectors level 3 spec: A comma-separated list of selectors represents the union of all elements selected by each of the individual selectors in the list. (A comma is …
Django — How to have a project wide templatetags shared among all my apps in that project
I don’t know if this is the right way to do it, but in my Django apps, I always place common template tags in a lib “app”, like so: proj/ __init__.py lib/ __init__.py templatetags/ __init__.py common_tags.py Just make sure to add the lib app to your list of INSTALLED_APPS in settings.py.
Xcode using FIXME, TODO, ???,?
In xcode 4.1 (don’t know if this works in previous versions) I write #warning TODO: fix this later… to get a compile warning or #error FIXME: fix now! to get a compile error. I also add these to the code snippet library to make it really ease to add todos.