Skip to content

Instantly share code, notes, and snippets.

View murilogteixeira's full-sized avatar
💻

Murilo Teixeira murilogteixeira

💻
View GitHub Profile
@murilogteixeira
murilogteixeira / x11vnc_server_on_startup.txt
Created February 10, 2025 03:09 — forked from YourFriendCaspian/x11vnc_server_on_startup.txt
Configure your system to have x11vnc running at startup.
## Ubuntu 15.04 – Configure your system to have x11vnc running at startup. ##
Hello World,
If you are following us, you probably remember that we wrote already a post about this topic
(see Ubuntu 14.10 – Configure your sytem to have x11vnc running at startup).
Since Ubuntu 15.04 is using systemd, the instructions found in the previous post are not applicable anymore.
Some of our readers had issues after upgrading to Ubuntu 15.04.
The x11VNC is not running at startup anymore.
@murilogteixeira
murilogteixeira / Guide.md
Created December 26, 2024 20:32 — forked from sebj/Guide.md
Add a scene delegate back to a SwiftUI Project

Define an application delegate

See also: UIApplicationDelegate documentation

// AppDelegate.swift
@main
final class AppDelegate: NSObject, UIApplicationDelegate {

    func application(
        _ application: UIApplication,
@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"