Skip to content

Instantly share code, notes, and snippets.

View santi020k's full-sized avatar
🎯
Focusing

Santiago Molina santi020k

🎯
Focusing
View GitHub Profile
@santi020k
santi020k / script
Last active August 20, 2020 19:50
Convert caplock to ctrl Linux
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
@santi020k
santi020k / .tmux.conf
Last active August 20, 2020 19:47
Unix term donfig
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 %
#!/bin/sh
echo "Script exect"
echo "Valid options YES or NO"
defaults write com.apple.finder AppleShowAllFiles $1
killall Finder
#!/bin/sh
echo "Script exect"
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
echo "Emulator its running"
@santi020k
santi020k / save-file.php
Last active November 4, 2017 20:14
Save files in Wordpress and return id
<?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 {
@santi020k
santi020k / compressImages.sh
Created March 23, 2017 20:50
Optimizing images inside a folder in the console linux
## 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
@santi020k
santi020k / docker_commands.sh
Last active November 9, 2023 23:36
Basic docker commands
# Notes
containerID # First 3 digits of the ID are usually sufficient
-it # Interactive mode
# Check Docker version
docker -v
# or
docker version
@santi020k
santi020k / git_basic_config.txt
Last active November 17, 2016 18:17
Basic git configuration for my
Options:
--local //only available into git project
--global // actually users
--system // all users
Commands:
Basic user config information:
$ git config --global user.email youremail@example.com // Configure email
$ git config --global user.name "YourName" // Configure user name
Best log show see branch and HEAD position