- Compile the program in gcc with debug symbols enabled (
-g
) - Do NOT strip the binary
- To generate assembly code using gcc use the -S option:
gcc -S hello.c
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
- The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.
Translations: (No guarantee that the translations are up-to-date)
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
- It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
- It is free, with no quotas.
- Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
Centos 6.* comes with Python 2.6, but we can't just replace it with v2.7 because it's used by the OS internally (apparently) so you will need to install v2.7 (or 3.x, for that matter) along with it. Fortunately, CentOS made this quite painless with their Software Collections Repository
sudo yum update # update yum
sudo yum install centos-release-scl # install SCL
sudo yum install python27 # install Python 2.7
To use it, you essentially spawn another shell (or script) while enabling the newer version of Python:
library('rgl'); library('magrittr') | |
cube <- function(x=0,y=0,z=0, bordered=TRUE, | |
filled = TRUE, lwd=2, scale=1, | |
fillcol = gray(.95), | |
bordercol ='black', ...) { | |
mycube <- cube3d() | |
# Reduce size to unit |
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
# a simple Python plugin loading system | |
# see http://stackoverflow.com/questions/14510286/plugin-architecture-plugin-manager-vs-inspecting-from-plugins-import | |
class PluginMount(type): | |
""" | |
A plugin mount point derived from: | |
http://martyalchin.com/2008/jan/10/simple-plugin-framework/ | |
Acts as a metaclass which creates anything inheriting from Plugin | |
""" |