Skip to content

Instantly share code, notes, and snippets.

var formData = new FormData(),
$input = $('#avatar');
formData.append('user[avatar]', $input[0].files[0]);
$.ajax({
url: this.model.url(),
data: formData,
cache: false,
contentType: false,
echo "Descargango Bluej"
cd /tmp/ && wget http://www.bluej.org/download/files/bluej-316.jar
echo "Instalando Bluej"
java -jar bluej-316.jar
echo "Moviendo instalación de bluej a /opt/bluej"
su -c "mv /tmp/bluej /opt/bluej"
cd /opt/bluej
echo "Descargando imagen para bluej"
su -c "wget \"https://www.google.com.mx/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjh2O_sz-XOAhUFSSYKHSVbA8YQjRwIBw&url=http%3A%2F%2Fwww.freeiconspng.com%2Ficons%2Fbluej-icon-png&bvm=bv.131286987,d.cGc&psig=AFQjCNGoZqsQPLN0CdFMYhu2Z0zYalPwtA&ust=1472525699271529\" -O bluej.png"
su -c "echo \"[Desktop Entry]\n
@lesm
lesm / molokai.vim
Last active March 26, 2021 06:35
Theme for vim
" Vim color file
"
" Author: Tomas Restrepo <[email protected]>
"
" Note: Based on the monokai theme for textmate
" by Wimer Hazenberg and its darker variant
" by Hamish Stuart Macpherson
" by Luis Silva and its variant
set background=dark
@lesm
lesm / install fonts
Created January 23, 2016 08:01
Install fonts Andale Mono, Arial, Arial Black, Comic Sans MS etc...
ccr ttf-ms-fonts
mkdir ~/.fonts
wget -qO- http://plasmasturm.org/code/vistafonts-installer/vistafonts-installer | bash
@lesm
lesm / .gitconfig
Last active November 28, 2022 22:48
[user]
name = Luis Silva
email = [email protected]
[core]
editor = nvim
excludesfile = /home/silva/.gitignore_global
; excludesfile = /Users/silva/.gitignore_global
[push]
default = current
[pull]
@lesm
lesm / .zshrc
Last active December 2, 2016 05:11
Configuración personal de ~/.zshrc
# Path to your oh-my-zsh installation.
export ZSH=/home/luis/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
ZSH_THEME="lesm"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
@lesm
lesm / LS_COLORS
Last active March 22, 2021 01:18
Personalizar LS_COLORS
#configuración de dircolor
export LS_COLORS="di=01;33:fi=07;36:ex=01;37:ow=01;04:*.avi=01;34:*.mp4=01;34:*.mp3=01;34:*.jpg=01;91:*.jpeg=01;91:*.gif=01;91:*.png=01;91:*.PDF=01;36:*.pdf=01;36:*.zip=01;32:*.tar=01;32:*.gz=01;32:*.bz2=01;32:*.iso=01;32:*.odt=01;36:*.txt=01;36:*.docx=01;36:*.cpp=1;36:*.c=1;34:*.rb=01;35:*.erb=01;35:*.vim=1;32:*.ova=1;32:*.java=1;31:*.js=0;33:*.html=1;31:*.css=1;34:*.scss=1;34:*.markdown=01;36:*.ruby-version=01;35:*.ruby-gemset=01;35:*.gitignore=01;32:*.lock=0:*.rdoc=0:*.ru=01;31:"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
@lesm
lesm / lesm.zsh-theme
Last active February 27, 2017 14:40
Theme personal para zsh
# Theme personal lesm
PROMPT='%{$fg_bold[green]%} ➜ %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%}$(git_prompt_status)%{$reset_color%}'
#git_prompt_info
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[yellow]%} ✘ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})%{$fg[green]%} ✔ %{$reset_color%}"
#git_prompt_status
@lesm
lesm / start_tmux_with_zsh
Created January 11, 2016 06:48
Iniciar tmux junto con la consola (bash | zsh)
# Iniciar tmux automáticamente
[[ $- != *i* ]] && return
[[ $TERM != screen* ]] && exec tmux -2
@lesm
lesm / .tmux.conf
Last active December 11, 2024 19:37
Configuración personal de tmux
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-nvim 'session'