Skip to content

Instantly share code, notes, and snippets.

View gmacario's full-sized avatar

Gianpaolo Macario gmacario

View GitHub Profile

Keybase proof

I hereby claim:

  • I am gmacario on github.
  • I am gmacario (https://keybase.io/gmacario) on keybase.
  • I have a public key ASBbrkNQXDgtV2lpTbG9ZsIucxAczNdoxeYxRYldEft8HQo

To claim this, I am signing this object:

@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() {
gmacario@ies-safelin01-ub16:~/linux-stable (master)*$ git log -1
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4
Author: Linus Torvalds <torvalds@linux-foundation.org>
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 / 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 //
#!/bin/sh
set -e
echo "INFO: gm-sysinfo.sh"
echo ""
echo "INFO: Executing uname -a"
uname -a
echo "INFO: Executing id"
id
#!/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
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.4.1">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
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