- Download the latest zsh package: https://packages.msys2.org/package/zsh?repo=msys&variant=x86_64
Example:
zsh-5.7.1-1-x86_64.pkg.tar.xz
Example:
zsh-5.7.1-1-x86_64.pkg.tar.xz
function(from_hex HEX DEC) | |
string(SUBSTRING "${HEX}" 2 -1 HEX) | |
string(TOUPPER "${HEX}" HEX) | |
set(_res 0) | |
string(LENGTH "${HEX}" _strlen) | |
while(_strlen GREATER 0) | |
math(EXPR _res "${_res} * 16") | |
string(SUBSTRING "${HEX}" 0 1 NIBBLE) | |
string(SUBSTRING "${HEX}" 1 -1 HEX) |
http://embedded-lab.com/blog/stm32-gpio-ports-insights/
http://hertaville.com/stm32f0-gpio-tutorial-part-1.html
The libmaple libraries, on which STM32duino is based, provides access to registers by the syntax:
GPIOA->regs->REG
git log --oneline -1 <PR-BRANCH>
git push -f origin :
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
from <app_name>.models import Foo | |
# ... | |
# Using the default admin interface: | |
admin.site.register(Foo) |
from django.contrib import admin | |
from myapp.models import Foo | |
from myapp.forms import FooForm | |
class FooAdmin(admin.ModelAdmin): | |
form = FooForm | |
prepopulated_fields = { 'slug': ['title'] } |