Skip to content

Instantly share code, notes, and snippets.

View murilogteixeira's full-sized avatar
💻

Murilo Teixeira murilogteixeira

💻
View GitHub Profile
@murilogteixeira
murilogteixeira / cocoapod.sh
Created February 15, 2024 17:42 — forked from rxmichael/cocoapod.sh
Podspec update script
#!/bin/bash
sources="https://github.com/CocoaPods/Specs.git"
podRepo="INSERT YOUR PRIVATE POD REPO HERE"
echo "--------tag list--------"
git tag -l
echo "--------tag list--------"
//
// MakeTransparentHoleOnOverlayView.swift
//
// Created by James Laurenstin on 2015-04-10.
// Copyright (c) 2015 Aldo Group Inc. All rights reserved.
//
import UIKit
class MakeTransparentHoleOnOverlayView: UIView {
@murilogteixeira
murilogteixeira / .git_autoremove.sh
Last active April 12, 2021 20:02 — forked from goncalossilva/.gitconfig
Auto remove branches excluídas ou mescladas locais e remotas | Autoremove deleted and merged branches, locally and remotely.
#!/bin/zsh
whitelist="master|main|dev|develop"
git fetch --prune
if [ -z "$1" ]; then
list=$(git branch --merged | egrep -v "(^\*|$whitelist)") &&
cmd='echo "$list" | xargs -n 1 git branch -d'
else
list=$(git branch -r --merged | grep "$1" | egrep -v "(>|$whitelist)") &&
cmd='echo "$list" | cut -d'/' -f2- | xargs -n 1 git push "$1" --delete'
@murilogteixeira
murilogteixeira / README.md
Last active April 2, 2021 01:05
Meus scripts personalizados para o terminal com possibilidade de atualizar em todos os terminais que utiliza
  1. Implemente as linhas seguintes ao final do arquivo ~/.zshrc
  2. Personalize o arquivo script.sh com o seu script personalizado
# ----------
# Scripts personalizados para o zsh
SCRIPT_URL='https://gist.github.com/3843d3d8c6455e854641f6580167d271.git'
FOLDER_NAME='.custom_script'
DIR="$HOME/$FOLDER_NAME"
@murilogteixeira
murilogteixeira / zsh-git-prompt.sh
Created January 18, 2021 12:51 — forked from bamanzi/zsh-git-prompt.sh
zsh: show git repo name, branch in right prompt
# although StackOverflow has this answer http://stackoverflow.com/a/1128583
# but that code is unreadable, thus I have this (also based on a SO anower: http://stackoverflow.com/a/1128721 )
# get the name of the branch we are on
_git_repo_name() {
gittopdir=$(git rev-parse --git-dir 2> /dev/null)
if [[ "foo$gittopdir" == "foo.git" ]]; then
echo `basename $(pwd)`
elif [[ "foo$gittopdir" != "foo" ]]; then
echo `dirname $gittopdir | xargs basename`
@murilogteixeira
murilogteixeira / gist:f7928d78cf838d8b117642bfb2e848df
Last active September 4, 2020 18:22 — forked from riosc/gist:4539602
How to Empty Caches and Clean All Targets Xcode
http://stackoverflow.com/questions/5714372/how-to-empty-caches-and-clean-all-targets-xcode-4
Command-Option-Shift-K to clean out the build folder. Even better, quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData manually.
Remove all its contents because there's a bug where Xcode will run an old version of your project that's in there somewhere.
(Xcode 4.2 will show you the Derived Data folder: choose Window > Organizer and switch to the Projects tab. Click the right-arrow to the right of the Derived Data folder name.)
In the simulator, choose iOS Simulator > Reset Content and Settings.
Finally, for completeness, you can delete the contents of /var/folders; some caching happens there too.
@murilogteixeira
murilogteixeira / xcode-build-bump.sh
Created August 27, 2020 02:51 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@murilogteixeira
murilogteixeira / main.yml
Created July 12, 2020 00:45
Settings file to deploy Publish project
name: Publish
on:
push:
branches: [ master ]
jobs:
build:
runs-on: macOS-latest
@murilogteixeira
murilogteixeira / my_bash_profile.sh
Last active July 1, 2020 21:33
My .bash_profile macOS.
#Git
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
#Pasta de shell scripts
export PATH=$PATH:~/development/shell/
alias watch='watch.sh'