This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options: | |
--local //only available into git project | |
--global // actually users | |
--system // all users | |
Commands: | |
Basic user config information: | |
$ git config --global user.email [email protected] // Configure email | |
$ git config --global user.name "YourName" // Configure user name | |
Best log show see branch and HEAD position |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Notes | |
containerID # First 3 digits of the ID are usually sufficient | |
-it # Interactive mode | |
# Check Docker version | |
docker -v | |
# or | |
docker version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Linux bash script | |
# Optimizing images inside a folder in the console linux (jpg and png) | |
## Dependencies | |
# Use Linux operating system | |
# install jpegoptim | |
# To install the program on Debian/Ubuntu: | |
# $ sudo apt-get install jpegoptim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function upload_user_file( $file = array() ) { | |
require_once( ABSPATH . 'wp-admin/includes/admin.php' ); | |
$file_return = wp_handle_upload( $file, array('test_form' => false ) ); | |
if( isset( $file_return['error'] ) || isset( $file_return['upload_error_handler'] ) ) { | |
return false; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Script exect" | |
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app | |
echo "Emulator its running" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Script exect" | |
echo "Valid options YES or NO" | |
defaults write com.apple.finder AppleShowAllFiles $1 | |
killall Finder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' # Reload tmux config | |
set -g base-index 1 # start windows numbering at 1 | |
setw -g pane-base-index 1 # make pane numbering consistent with windows | |
# split panes using _ and - | |
bind _ split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/powerlevel10k/powerlevel10k.zsh-theme | |
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. | |
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh | |
# Convert caplock to ctrl Linux | |
setxkbmap -layout latam -option ctrl:nocaps | |
export TERM=xterm-256color |