marcelpetrick
Get rid of the master-branch @ github
issue:
1 2 3 4 5 6 |
$ git push origin --delete master Username for 'https://github.com': marcelpetrick Password for 'https://marcelpetrick@github.com': To https://github.com/marcelpetrick/PiCamGifForTumblr.git ! [remote rejected] master (refusing to delete the current branch: refs/heads/master) error: failed to push some refs to 'https://github.com/marcelpetrick/PiCamGifForTumblr.git' |
solution:
- create a fake branch and push it
- go to
github > $your_repo > settings > branches > default branch
and make the fake branch the current one - delete master
- push new master
- revert the default branch
share a folder via SMB on CLI
The missing counter-part for this post.
- create new smb-user pi: “
$ sudo smbpasswd -a pi
“ - create directory: “
$ mkdir freigabeATminipc
“ - set rights: “
$ sudo chmod 770 freigabeATminipc/
“ - edit config: “
$ sudo nano /etc/samba/smb.conf
”
add at end of the file the following and save-quit (CTRL+X; y)
1 2 3 4 5 6 7 |
[freigabeATminipc] comment = for sharing path = /home/pi/Desktop/freigabeATminipc valid users = pi browseable = yes read only = no guest ok = yes |
- restart: “
$ sudo service smbd restart
“ - check if everything fits: “
$ testparm
“
Mixing SVN and Git
When you join a new team, you don’t enforce your view of best tools of trade – instead you adapt to the new environment. Even if that means that you have to switch from your favorite CVS (Git) to something you used last time in 2008 (Subversion) …
I am aware, that the Git-client is fully backward-compatible to SVN and also able to do the most common tasks. But for me it was the branching model, the stashes and also the GUI from SmartGit, which lead me to the idea: why not mix both version-controls in one directory?
steps:
- clone the repository via SVN (TortoiseSVN)
- run
$ git init
- add the following stuff to your
.gitignore
:
1234567891011121314### own #### ignore subversion subdirectories for no conflicts.svn# temporary files and stuff from Qt/target/tmp/*.vcxproj*.vcxproj.filtersmoc_*.cppui_*.h*_moc.cpp*_res.cpp### from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore ##### Ignore Visual Studio temporary files, build results, and files generated by popular Visual Studio add-ons.[..] - add the following exclusions to your
TortoiseSVN > Settings > General > Subversion > Global ignore-pattern
:
1.gitignore .git - stash, branch, stage as much as you want – use TortoiseSVN for the final commit, which should be published to the team
I use this set-up now for some weeks and it works. Saved me lots of hassles. Because I have not figured out (yet?) how to create local “mile-stones” as safety-backup with SVN.
RPi: force certain resolution for VNC in headless mode
Edit /boot/config.txt (maybe via “$ sudo nano /boot/config.txt”) and add the following two lines:
1 2 |
framebuffer_width = 1024 framebuffer_height = 768 |
Other sources suggest also to tinker with the hdmi_mode, but for my Raspberry Pi 3 this was sufficient.
Full official manual for config.txt.
mount a smb-share (not via fstab!)
Don’t know how often I did this on several systems and still always(!) have to pick the parameters.
1 2 3 |
$ sudo apt-fast install samba samba-common smbclient cifs-utils $ mkdir freigabeATminipc $ sudo mount -t cifs -o user=guest //MINIPC/freigabe freigabeATminipc/ |
Check for available shares in the network via “smbtree”.
“If Microsoft ever does applications for Linux it means I’ve won.”
~ Linus Torvalds
I’ve given Visual Studio Code for Linux as prebuilt rpm-package a try. I don’t know what I expected ten minutes ago, but I am definitely under-whelmed! Another editor with syntax-highlighting, code-completion, integrated git-support and the ability to add “extensions” for all kinds of stuff. But: do I miss the trick or how do I start build binaries? (edith: possible via some “we need another build-configuration-system..”-JSON).
OK, it was fun to test, but now back to my favorite IDE* 😉 gedit & gcc on the terminal can do the same, so I don’t see any reason to use VS Code. Maybe for Go or one of the other languages, but not C++.
*QtCreator
screencast @ Linux: byzanz
Wanted to illustrate an annoying fact by a short animated clip.
byzanz is the tool to go. And this guy describes how to install and use it via a small helper-script.
apt-fast as multi-connection drop-in-replacement for apt-get
- how to install
- edit “$ sudo gedit /etc/apt-fast.conf” in line “DOWNLOADBEFORE=true” to get rid of the annoying question-dialog (if you intend to use apt-fast, you don’t care about pre-loading stuff ..)
- how to use: $ sudo apt-fast update && sudo apt-fast dist-upgrade
Not much more to add. Can’t wait for a full reinstall and then testing apt-fast with the whole distributio-update. Use it now for month – updating has never been faster. Poor OSX- and Windows-users ..
aseprite: how to build @ Linux
What should i say? I was searching for a more sophisticated GIF-editor to create more smooth animation-loops. Then I saw aseprite. Binaries require “donation”, so why not build it yourself since it is OSS? Sadly there were no clear official hints on how to build on Linux.
Turns out this guide is giving the correct directions:
1 2 |
cmake .. -G "Unix Makefiles" make -j 3 |
Estimate quickly the ‘size’ of the project
Nothing in comparison to SLOCCount or other tools, but sometimes you just need a ‘value‘ 😉
1 |
find . -regex ".*\.\(h\|cpp\)" | sort | xargs wc -l |
103 ./main.cpp
90 ./map.cpp
35 ./map.h
63 ./mapitem.cpp
29 ./mapitem.h
122 ./mapprocessor.cpp
27 ./mapprocessor.h
79 ./mapreader.cpp
23 ./mapreader.h
571 total
edith 20160819: sort the result before counting for a much nicer appearance 😉