Skip to content

Instantly share code, notes, and snippets.

View gmacario's full-sized avatar

Gianpaolo Macario gmacario

View GitHub Profile
@gmacario
gmacario / Dockerfile
Last active November 23, 2021 02:40
Can you run GUI apps in Docker?
# From http://stackoverflow.com/questions/16296753/can-you-run-gui-apps-in-a-docker
#
# Firefox over VNC
#
# VERSION 0.1
# DOCKER-VERSION 0.2
from ubuntu:12.04
# make sure the package repository is up to date
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
Started by user anonymous
Building in workspace /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/wakaleo/jenkins-the-definitive-guide-book.git # timeout=10
Fetching upstream changes from https://github.com/wakaleo/jenkins-the-definitive-guide-book.git
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress https://github.com/wakaleo/jenkins-the-definitive-guide-book.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
#!/bin/sh
docker exec -ti -u jenkins easyjenkins_build-yocto-slave_1 sh -c "cd /home/jenkins/workspace/build-gdp/gdp-src-build; ls downloads"
docker exec -ti -u jenkins easyjenkins_build-yocto-slave_1 sh -c "cd /home/jenkins/workspace/build-gdp/gdp-src-build; ls tmp/deploy"
docker exec -ti -u jenkins easyjenkins_build-yocto-slave_1 sh -c "cd /home/jenkins/workspace/build-gdp/gdp-src-build; ls tmp/deploy/images"
docker exec easyjenkins_build-yocto-slave_1 \
sh -c "cd /home/jenkins/workspace/build-gdp/gdp-src-build; tar -czv downloads" \
> bk-gdp-src-build-downloads-$(date '+%Y%m%d-%H%M').tar.gz
#!/bin/sh
set -e
echo "INFO: gm-sysinfo.sh"
echo ""
echo "INFO: Executing uname -a"
uname -a
echo "INFO: Executing id"
id
@gmacario
gmacario / sx1278_master.cpp
Created August 9, 2017 18:40 — forked from donghee/sx1278_master.cpp
sx1278_from_doriji: 2016-03-05 it's works. from hama to mangwon-dong han river.
#define RF_RESET 11
#define RF_DIO0 12
#define RF_SCK 13
#define RF_MISO 14
#define RF_MOSI 15
#define RF_NSEL 16
#define LED1 PIN_LED1
#define LED2 22 //
gmacario@ies-safelin01-ub16:~/linux-stable (master)*$ git log -1
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4
Author: Linus Torvalds <[email protected]>
Date: Sun Nov 12 10:46:13 2017 -0800
Linux 4.14
gmacario@ies-safelin01-ub16:~/linux-stable (master)*$ make coccicheck MODE=report COCCI=scripts/coccinelle/misc/array_size.cocci
Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.
@gmacario
gmacario / show-branch.md
Created January 15, 2018 13:10 — forked from githubteacher/show-branch.md
Adding your Git branch to your command prompt

To show your active Git branch in your command prompt, you will need to do the following:

  • If you are on a Mac, you can add the code shown below to your .bash_profile file.
  • If you are on Linux, you will add the code shown below to your .bashrc file.
  • If you are on Windows, you probably aren't reading this because Windows provides this behavior by default.

The Script

parse_git_branch() {