Skip to content

Instantly share code, notes, and snippets.

View gianpaolof's full-sized avatar
🏍️

gianpaolo gianpaolof

🏍️
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
@DRSchlaubi
DRSchlaubi / app-build.gradle.kts
Last active February 27, 2025 05:10
Flutter Kotlin Gradle DSL
import java.util.Properties
import java.nio.file.Files
val localProperties = Properties()
val localPropertiesFile = rootProject.file("local.properties").toPath()
if (Files.exists(localPropertiesFile)) {
Files.newBufferedReader(localPropertiesFile).use { reader ->
localProperties.load(reader)
}
}
@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 April 17, 2025 20:20
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 April 12, 2025 00:09 — 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)