Skip to content

Instantly share code, notes, and snippets.

View gianpaolof's full-sized avatar
🏍️

gianpaolo gianpaolof

🏍️
  • Italy
View GitHub Profile
@mikkipastel
mikkipastel / Jenkinsfile
Last active August 22, 2023 17:31
android jenkins pipeline
pipeline {
agent any
stages {
stage('Checkout') {
options {
retry(3)
}
steps {
//Checkout new source code
@lalitkale
lalitkale / update-repo.sh
Created September 30, 2019 13:44
Update Local Repository Folders Recursively
#!/bin/bash
# Usage:
# ./update_git_repos.sh [parent_directory]
# example usage:
# ./update_git_repos.sh C:/GitProjects/ [MAKE SURE YOU USE / SLASHES]
updateRepo() {
local dir="$1"
local original_dir="$2"
cd $dir # switch to the git repo
@kibotu
kibotu / FragmentArgumentDelegate.kt
Last active May 13, 2021 14:22 — forked from yanngx/FragmentArgumentDelegate.kt
Fragment arguments without hassle !
package tv.freenet.selfcare.extensions
import android.os.Binder
import android.os.Bundle
import android.os.Parcelable
import androidx.core.app.BundleCompat
import androidx.fragment.app.Fragment
import org.parceler.ParcelWrapper
import org.parceler.Parcels
@Schadenfeude
Schadenfeude / Jenkinsfile
Last active March 18, 2024 00:25
Example Jenkinsfile declarative pipeline for Android projects
pipeline {
agent {
// Run on a build agent where we have the Android SDK installed
label 'android'
}
environment {
// Fastlane Environment Variables
PATH = "$HOME/.fastlane/bin:" +
"$HOME/.rvm/gems/ruby-2.5.3/bin:" +
"$HOME/.rvm/gems/ruby-2.5.3@global/bin:" +
@cjus
cjus / .docker_aliases
Last active July 13, 2023 23:50
Docker aliases
#!/bin/sh
alias dm='docker-machine'
alias dmx='docker-machine ssh'
alias dk='docker'
alias dki='docker images'
alias dks='docker service'
alias dkrm='docker rm'
alias dkl='docker logs'
alias dklf='docker logs -f'
@agarthetiger
agarthetiger / QuotesInJenkinsfiles.groovy
Last active February 15, 2024 10:06
Quoting strings and variable interpolation in Jenkinsfiles, passing values to shell tasks.
node{
timestamps{
stage('Samples'){
// Single quotes with no interpolation, at least not in Jenkins.
// The dollar variable will be evaluated before being run by the
// shell command, so variables which Jenkins makes available as
// environment variables can still be accessed from within a
// single-quoted string, passed to the sh task.
sh 'echo $PATH'
@katopz
katopz / setup-zeromq.sh
Last active August 10, 2021 21:47 — forked from cdjhlee/zeromq_install.sh
Setup zeromq in Ubuntu 16.04
#!/usr/bin/bash
# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz
# Install dependency
@mksantoki
mksantoki / MainActivity.java
Created October 31, 2017 17:52
FileChooser in Android webview
/*
reference link ->https://www.opengeeks.me/2015/08/filechooser-and-android-webview/
https://github.com/OpenGeeksMe/Android-File-Chooser
*/
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
@robballou
robballou / commit_everything.sh
Last active December 14, 2022 21:23
A script to commit the git parent repo and any submodule changes too
#!/bin/bash
#
# Usage: ./commit_everything.sh "Commit message"
BOLD=$(tput bold)
BLACK=$(tput setaf 0)
WHITE=$(tput setaf 7)
BLUE=$(tput setaf 4)
GREEN=$(tput setaf 2)
NORMAL=$(tput sgr0)
@jim3ma
jim3ma / makecert.sh
Last active June 29, 2023 02:17 — forked from spikebike/client.go
Golang TLS server and client
#!/bin/bash
# call this script with an email address (valid or not).
# like:
# ./makecert.sh joe@random.com
mkdir certs
rm certs/*
echo "make server cert"
openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1"
echo "make client cert"
openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1"