Skip to content

Instantly share code, notes, and snippets.

View tsainte's full-sized avatar
😼

Tiago Bencardino tsainte

😼
View GitHub Profile
@tsainte
tsainte / rename_lingoda_files.sh
Created January 20, 2019 12:01
Script for renaming pdf files from Lingoda to meaninful names
# Script for renaming pdf files from Lingoda to meaninful names
# PDF titles from metadata as file name
# Dependency: brew install exiftool
for file in *.pdf
do
mv "$file" "$(exiftool $file -title -s -s -s | cut -d':' -f 2 | cut -c 2-50 | cut -d'[' -f 2 | cut -d']' -f 1).pdf"
done
@tsainte
tsainte / install_dependencies.sh
Created January 11, 2019 17:45
Script to install basic dependencies on basic swift apps :)
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew install swiftlint
gem install bundler
bundle install
bundle exec pod install
@tsainte
tsainte / download_release_data.sh
Created December 6, 2018 10:04
Script to download keystore for signing android apps
#!/bin/bash
# download_release_data.sh
# If you’re using bitbucket, you can just set the env-var in the circle config for your bitbucket repo
git archive — remote=ssh://${BITBUCKET_CERTS_REPO} HEAD prod.keystore | tar -x
git archive — remote=ssh://${BITBUCKET_CERTS_REPO} HEAD google-play.json | tar -x
# if you’re using github, you can give your machine user a GH access token to simply grab the file, the names of which can be stored in the circle env-var section as well
curl -L — header “Authorization: token ${GH_TOKEN}” \
— header ‘Accept: application/vnd.github.v3.raw’ \
— remote-name \
— location “${GITHUB_URL_FOR_KEYSTORE}”
@tsainte
tsainte / pimp_my_react_native_pipeline.sh
Created November 29, 2018 05:53
Adds dependencies in a React Native project
###################### Pimp my React Native pipeline ######################
# This script will install basic dependencies for your React Native project, to be integrated with a Jenkins pipeline.
# Check this script if you need to setup a new macOS machine with Jenkins:
# https://gist.github.com/tsainte/ac7e45884f28cb9e265e4bb888e45bf3
###################### SSH ######################
# Bundler is the ruby package manager per project. We shall use it to ensure our gems always have the same version.
# Useful commands: bundle init, bundle add, bundle install, bundle update...
echo "Installing bundler"
@tsainte
tsainte / jenkins_bootstrap.sh
Last active December 5, 2018 09:45
This is a bootstrap for helping create a pipeline for react native and Jenkins
###################### Jenkins Bootstrap ######################
# This script will configure your brand new macOS to support Jenkins running react native projects.
# If you need help to configure dependencies on a React Native proejct, check this script:
# https://gist.github.com/tsainte/8e2aab30e81bf54a2523fa552a37932c
# It works on my machine - macOS Mojave
###################### SSH ######################
# Configure Jenkins machine to be access via SSH
echo "Enable ssh remote access"
# Remove files from gitignore
# http://stackoverflow.com/questions/13541615/how-to-remove-files-that-are-listed-in-the-gitignore-but-still-on-the-repositor
git rm --cached `git ls-files -i --exclude-from=.gitignore`
@tsainte
tsainte / README.md
Created May 26, 2018 10:47
Bootstrapping the README.md

Welcome to MyProject 👋

Here goes a simple description, with an image, gif or whatever. It's the elevator pitch. 🚀

Purpose 🤓

Here you can talk about your motivation by creating the project, challenges, etc. 💪

To run the project 🏃‍

@tsainte
tsainte / Gemfile
Created May 26, 2018 10:15
Basic gemfile configuration for my iOS projects
source 'https://rubygems.org' do
gem 'cocoapods', '~>1.5'
gem 'fastlane', '~>2.8'
gem 'slather', '2.4.5'
end
@tsainte
tsainte / Podfile
Last active May 26, 2018 10:30
Basic cocoapods configuration for my iOS projects
platform :ios, '11.3'
inhibit_all_warnings!
target 'MyProject' do
use_frameworks!
pod 'AFDateHelper', '~> 4.2.2'
pod 'Alamofire', '~> 4.7'
pod 'FontAwesome.swift', '~> 1.3'
pod 'RealmSwift', '~> 3.5'
@tsainte
tsainte / osx_bootstrap.sh
Last active January 6, 2020 15:33 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)