Skip to content

Instantly share code, notes, and snippets.

View alissonperez's full-sized avatar

Alisson R. Perez alissonperez

  • São Paulo, SP, Brasil
View GitHub Profile
@alissonperez
alissonperez / gist:10a17496d63caca36fcdb1c2d8a636ac
Last active October 22, 2022 15:23 — forked from mayoff/gist:1138816
AppleScript to make Google Chrome Canary open/reload a URL
(* To the extent possible under law, Rob Mayoff has waived all copyright and related or neighboring rights to “AppleScript to make Google Chrome open/reload a URL”. This work is published from: United States. https://creativecommons.org/publicdomain/zero/1.0/ *)
tell application "Google Chrome Canary"
activate
set i to 0
repeat with w in (windows) -- loop over each window
set j to 1 -- tabs are not zeroeth
repeat with t in (tabs of w) -- loop over each tab
if title of t starts with "Meet:" then
set (active tab index of w) to j -- set Meet tab to active
set index of w to 1 -- set window with Meet tab to active
@alissonperez
alissonperez / .gitlab-ci.yml
Created May 4, 2018 21:25 — forked from foklepoint/.gitlab-ci.yml
Build and Push images to GCP Container Registry with Gitlab CI
image: docker:latest
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
variables:
DOCKER_DRIVER: overlay
GCP_PROJECT_ID: CHANGE-TO-GCP-PROJECT-ID
IMAGE_NAME: image_id
services:
@alissonperez
alissonperez / bash_ps1
Last active August 29, 2015 14:16 — forked from cmsouza/bash_ps1
# no seu bashrc
source ~/.bash-gitprompt.sh #<--- https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
PS1='\[\033]0;\u@\h:\W\007\]`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \[\033[01;37m\ ]\h\[\033[01;34m\] \w\[\033[35m\]$(__git_ps1 " %s") \[\033[01;36m\]$\[\033[00m\] '
# no do root
PS1='\[\033]0;\u@\h:\W\007\]`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \[\033[00;31m\]\u@\h\[\033[01;34m\] \w\[\033[35m\] \[\033[01;31m\]#\[\033[00m\] '
# nas vms
PS1='\[\033]0;\u@\h:\W\007\]`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \[\033[01;33m\]\u@\h\[\033[01;34m\] \w\[\033[35m\] \[\033[01;30m\]$\[\033[00m\] '
import sublime, sublime_plugin, datetime
class InsertTimeCommand(sublime_plugin.TextCommand):
def run(self, edit):
date_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
for r in self.view.sel():
self.view.replace(edit, r, date_time)