View fix.md
sudo apt-get install xserver-xorg-legacy

Edit /etc/X11/Xwrapper.config

allowed_users=anybody
needs_root_rights=yes
View volatile-1.cpp
/*
* Example 1: exits on SIGINT
*/
#include <iostream>
#include <signal.h>
#include <unistd.h>
bool continueRunning = true;
void sighandler(int signum) {
View core-dump.md

Sistema per salvare lo stato dell'applicazione al momento del crash, per poter debuggare anche dopo il crash.

Possiamo anche usare gdb da x86 per debuggare un'applicazione che girava su arm.

Dal sistema in cui gira applicazione:

Per mettere al massimo il limite della dimensione disponibile per i core dump:

ulimit -c unlimited
View 0001-fix-missing-boost-array.patch
From 10328d6d369a2218832315162741bd04d35fe85d Mon Sep 17 00:00:00 2001
From: Alessandro Pezzato <alessandro.pezzato@gmail.com>
Date: Wed, 31 May 2017 09:06:03 +0200
Subject: [PATCH] fix missing boost::array
---
include/crow/websocket.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/crow/websocket.h b/include/crow/websocket.h
View beep.cpp
#include <cmath>
#include <iostream>
#include <thread>
using namespace std;
#include <AL/alut.h> // OpenAl
void init_al()
{
View beep.cpp
#include <AL/alut.h> // OpenAl
#include <cmath>
#include <iostream>
#include <thread>
using namespace std;
void init_al() {
const char* defname = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
ALCdevice* dev = alcOpenDevice(defname);
View eh-receiver.js
const EventHubClient = require('azure-event-hubs').Client;
const Promise = require('bluebird');
const connectionString = '__OBFUSCATED__';
const eventHubPath = 'foo';
const client = EventHubClient.fromConnectionString(connectionString, eventHubPath);
var printError = function(err) {
console.error(err.message);
View test-utf8-length.js
(new TextEncoder('utf-8').encode('è'))
View u-boot-usb.txt
env set bootcmd_usb "run findfdt; usb start; if run loadimage_usb; then run usbboot; fi"
env set loadfdt_usb "fatload usb ${usbdev}:${usbpart} ${fdt_addr} ${fdt_file}"
env set loadimage_usb "fatload usb ${usbdev}:${usbpart} ${loadaddr} ${image}"
env set usbargs "setenv bootargs console=${console},${baudrate} root=${usbroot}"
env set usbboot "echo Booting from usb ...; run usbargs; if run loadfdt_usb; then bootz ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi"
env set usbdev 0
env set usbpart 1
env set usbroot "/dev/sda2 rootwait rw"
run bootcmd_usb
View post-commit
#!/bin/bash
FILE="$( cd "${GIT_DIR}" && cd .. && pwd )/.gitversion.h"
echo '#ifndef GIT_VERSION' > "${FILE}"
echo -n '#define GIT_VERSION "' >> "${FILE}"
git rev-parse HEAD | tr -d '\n' >> "${FILE}"
echo '"' >> "${FILE}"
echo '#endif' >> "${FILE}"