Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
valid_days=5
cert_dir='/home/cgmeiner/.config/letsencrypt/live'
cert_file='cert.pem'
domains='www.christian-gmeiner.info'
export PATH=/usr/local/bin/:$PATH
for domain in $domains; do
@austriancoder
austriancoder / fix-ptrace.sh
Created May 1, 2016 21:41
QtCreator: ptrace operation not permitted
sudo echo 0 > /proc/sys/kernel/yama/ptrace_scope
@austriancoder
austriancoder / item.cpp
Created May 2, 2016 07:10
QMetaEnum: Serializing C++ Enums
const QString Item::type() const
{
const QMetaObject &mo = Item::staticMetaObject;
int index = mo.indexOfEnumerator("Type");
QMetaEnum metaEnum = mo.enumerator(index);
return metaEnum.valueToKey(m_type);
}
void Item::setType(const QString &type)
gpu-subsystem {
#address-cells = <1>;
#size-cells = <1>;
compatible = "vivante,gccore";
ranges;
gpu2d@00134000 {
compatible = "vivante,vivante-gpu-2d";
reg = <0x00134000 0x4000>;
clock-names = "core", "bus";
git remote add upstream https://github.com/laanwj/etna_viv.git
git fetch upstream
git rebase upstream/master
git push -f origin master
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst")
root@arm:~# rm /etc/ssh/ssh_host_*
root@arm:~# dpkg-reconfigure openssh-server
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
Restarting OpenBSD Secure Shell server: sshd.
@austriancoder
austriancoder / git-cheat-sheet.md
Created November 27, 2016 21:21 — forked from iansheridan/git-cheat-sheet.md
A cheat sheet for GIT

Setup

git clone <repo>

clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS

Add colors to your ~/.gitconfig file:

@austriancoder
austriancoder / armada_ddx_xorg.log
Created February 10, 2017 21:11
working armada ddx with etnaviv
[ 26.447] (II) armada: Support for Marvell LCD Controller: 88AP510
[ 26.447] (II) armada: Support for Freescale IPU: i.MX6
[ 26.490] (II) armada(0): Added screen for KMS device /dev/dri/card0
[ 26.490] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 26.490] (II) armada(0): hardware: imx-drm
[ 26.491] (II) armada(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 26.491] (==) armada(0): Depth 24, (--) framebuffer bpp 32
[ 26.491] (==) armada(0): RGB weight 888
[ 26.491] (==) armada(0): Default visual is TrueColor
@austriancoder
austriancoder / heapstat.sh
Created April 24, 2017 10:25
small script to get some heap information of a process
#!/bin/sh
statusname="/proc/$1/status"
smapsname="/proc/$1/smaps"
echo "===================== $(date +'%s %c') ====================="
awk '
$1 == "MemFree:" { free = $2; next }
$1 == "Cached:" { cached = $2; next }