Skip to content

Instantly share code, notes, and snippets.

View rogervila's full-sized avatar
:octocat:
Loving Open Source

Roger Vilà rogervila

:octocat:
Loving Open Source
View GitHub Profile
@rogervila
rogervila / sublimetext-keymap.json
Last active September 2, 2017 11:28
sublimetext3 keymaps
[
{ "keys": ["f12"], "command": "reindent", "args": {"single_line": false}},
{ "keys": ["alt+e"], "command": "expand_fqcn" },
{ "keys": ["alt+i"], "command": "find_use" },
{ "keys": ["alt+c"], "command": "insert_php_constructor_property" },
{ "keys": ["alt+f7"], "command": "toggle_comment", "args": { "block": false } }
]
@rogervila
rogervila / sublimetext-settings.json
Last active December 29, 2020 18:11
Sublimetext3 settings
{
"auto_complete": false,
"bold_folder_labels": true,
"caret_style": "phase",
"detect_indentation": false,
"ensure_newline_at_eof_on_save": true,
"font_size": 14,
"highlight_line": true,
"ignored_packages":
[
@rogervila
rogervila / Useful OSX Commands
Created December 13, 2016 10:33
Useful OSX Commands
# Disable Photos agent: http://superuser.com/questions/920116/disable-auto-launching-of-photos-application-on-mac-osx-yosemite-el-capitan
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES
defaults -currentHost write com.apple.Photos disableHotPlug -bool YES
@rogervila
rogervila / Useful Windows Commands
Created December 13, 2016 10:34
Useful Windows Commands
# Chrome flags for development
--disable-application-cache --media-cache-size=1 --disk-cache-size=1 --"%1"
# Delete mac junk
del /s /q /f /a .DS_STORE
@rogervila
rogervila / JekyllValetDriver.php
Last active September 1, 2017 20:28
JekyllValetDriver
<?php
class JekyllValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@rogervila
rogervila / install-docker-on-ubuntu.sh
Last active October 25, 2018 11:58
Install docker on ubuntu
#!/usr/bin/env bash
cd "$(dirname "$0")"
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update -y
echo -e "\e[32mInstalling docker...\e[0m"
sudo apt-get remove docker docker-engine docker.io docker-compose -y
@rogervila
rogervila / vscode.json
Last active February 15, 2022 12:12
VSCode Settings
{
"workbench.startupEditor": "newUntitledFile",
"tabnine.experimentalAutoImports": true,
"editor.fontSize": 20,
"editor.lineHeight": 45,
"editor.cursorBlinking": "smooth",
"editor.multiCursorModifier": "ctrlCmd",
"editor.mouseWheelScrollSensitivity": 1,
"editor.trimAutoWhitespace": true,
"editor.formatOnSave": true,
@rogervila
rogervila / .yarnrc
Created May 7, 2018 14:49
.yarnrc for docker containers
--install.no-bin-links true
--modules-folder /nodemodules
--child-concurrency 1
--ignore-scripts true
@rogervila
rogervila / .bashrc
Created May 15, 2018 10:48
Useful PS1
# 00:00:00 user@server:[/current/path]
export PS1=export PS1="\[\033[38;5;231m\]\t\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;85m\]\u@\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;195m\][\w]\[$(tput sgr0)\]\[\033[38;5;17m\]:\[$(tput sgr0)\]\[\033[38;5;15m\]\[$(tput sgr0)\]"
@rogervila
rogervila / bash-ps1.sh
Created June 28, 2018 07:47
Bash PS1 templates
# Examples generated from http://bashrcgenerator.com/
# Green
export PS1=export PS1="\[\033[38;5;231m\]\t\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;85m\]\u@\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;195m\][\w]\[$(tput sgr0)\]\[\033[38;5;17m\]:\[$(tput sgr0)\]\[\033[38;5;15m\]\[$(tput sgr0)\]"
# Red
export PS1="\t \[$(tput sgr0)\]\[\033[38;5;9m\]\u@\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;1m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"