Skip to content

Instantly share code, notes, and snippets.

@mgasiorowski
mgasiorowski / build.log
Created January 25, 2021 13:39
Gopengpg android build log
Start installing go modules and their dependencies
Done
Installing gomobile fork
Done
GO111MODULE=""
GOARCH="amd64"
#!/usr/bin/env bash
PROJECT_NAME="project-name"
CONTAINER_NAME="container"
# define some colors to use for output
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
# kill and remove any running containers
cleanup () {
@mgasiorowski
mgasiorowski / jenkins_change_jobs_node.groovy
Last active April 6, 2017 13:32
[Jenkins] Find jobs with specific node and change him
import jenkins.model.*
jenkinsInstance = jenkins.model.Jenkins.instance
allItems = jenkinsInstance.getAllItems()
for(int i = 0; i < allItems.size(); i++) {
if(!(allItems[i] instanceof com.cloudbees.hudson.plugins.folder.Folder) && !(allItems[i] instanceof org.jenkinsci.plugins.workflow.job.WorkflowJob) && allItems[i].getAssignedLabelString() =~ "centos"){
allItems[i].setAssignedLabel(jenkins.model.Jenkins.instance.getLabel("centos_7.2"))
println(allItems[i].name + ": " + allItems[i].getAssignedLabel())
}
}
Pod::Spec.new do |s|
s.name = "Calabash"
s.version = "0.17.0"
s.summary = "Calabash is an automated testing technology for Android and iOS native and hybrid applications."
s.homepage = "https://github.com/calabash/calabash-ios"
s.license = { :type => "Eclipse Public License 1.0", :text => <<-LICENSE
Calabash-ios Copyright (2015) Karl Krukow. All rights reserved.\n
The use and distribution terms for this software are covered by the\n
Eclipse Public License 1.0\n
#Check if an argument was supplied
if [ -z "$1" ]
then
echo "No argument supplied, please provide video name"
else
# start recording
adb shell screenrecord /sdcard/$1.mp4 &
# Get its PID
PID=$!
@mgasiorowski
mgasiorowski / android_sdk_updater.py
Last active January 4, 2016 14:16
Android SDK updated
import argparse
import subprocess
import re
import sys
import os
parser = argparse.ArgumentParser(description="Android SDK updater")
parser.add_argument("-o", "--proxy-host", dest="proxy_host", help="HTTP/HTTPS proxy host")
parser.add_argument("-p", "--proxy-port", dest="proxy_port", help="HTTP/HTTPS proxy port")
@mgasiorowski
mgasiorowski / gist:9892682
Last active August 29, 2015 13:57
Swipe to left for robotium test for android 2.x and 4.x
private void swipeToLeft(int stepCount, int repNumber) {
for(int x = 0; x < repNumber; x++) {
solo.waitForActivity(solo.getCurrentActivity().toString(), 5000);
Display display = solo.getCurrentActivity().getWindowManager().getDefaultDisplay();
int width = 0;
int height = 0;
if (android.os.Build.VERSION.SDK_INT <= 13) {
width = display.getWidth();
height = display.getHeight();
} else {