Skip to content

Instantly share code, notes, and snippets.

View hugofcampos's full-sized avatar
:octocat:

Hugo Campos hugofcampos

:octocat:
View GitHub Profile
@hugofcampos
hugofcampos / symfony-setup.sh
Created February 9, 2017 17:26
Backoffice (Symfony) Setup
# setup hml
composer install
bower install -F
php app/console cache:clear
php app/console cache:clear --env=prod
php app/console assetic:dump
php app/console assetic:dump --env=prod --no-debug
php app/console assets:install
php app/console assets:install --env=prod --no-debug
@hugofcampos
hugofcampos / csgo-crosshair.cfg
Created February 8, 2017 22:55
CS:GO crosshair
cl_crosshairalpha "200"
cl_crosshaircolor "5"
cl_crosshaircolor_b "50"
cl_crosshaircolor_r "50"
cl_crosshaircolor_g "250"
cl_crosshairdot "0"
cl_crosshairgap "-1"
cl_crosshairsize "3"
cl_crosshairstyle "4"
cl_crosshairusealpha "1"
@hugofcampos
hugofcampos / kong.conf
Created June 6, 2016 22:15
Upstart for Docker Kong
#/etc/init/kong.conf
# Kong Server Container Service
description "Kong App"
author "Ingresse S.A."
start on filesystem and started docker
stop on runlevel [!2345i]
respawn
@hugofcampos
hugofcampos / gist:7a0b36cbd91462d99212
Created November 27, 2015 12:44 — forked from codemis/gist:8225337
A Git pre-commit hook for validating code follows PHP's Fig Coding Standard. The script requires PEAR's Code Sniffer library. Change the variables to fit your project code structure. Just drop this file in your .git/hooks/ directory. This script is a modified file created by Soenke Ruempler.
#!/bin/bash
# PHP CodeSniffer pre-commit hook for git
#
# @author Soenke Ruempler <soenke@ruempler.eu>
# @author Sebastian Kaspari <s.kaspari@googlemail.com>
#
# see the README
PHPCS_BIN=/usr/local/bin/phpcs
PHPCS_CODING_STANDARD=PSR2
@hugofcampos
hugofcampos / .bash_profile
Created August 1, 2015 19:57
Bash Profile (OS X)
export PATH="/usr/local/bin:$PATH"
source /usr/local/git/contrib/completion/git-completion.bash
source /usr/local/git/contrib/completion/git-prompt.sh
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
@hugofcampos
hugofcampos / .bash_aliases
Created July 7, 2015 14:03
Puphpet Bash Aliases
if [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi
__has_parent_dir () {
# Utility function so we can test for things like .git/.hg without firing up a
# separate process
test -d "$1" && return 0;
current="."
@hugofcampos
hugofcampos / run-mysql-dump-with-progress-bar
Last active August 29, 2015 14:10
Run MySQL Dump with progress bar
#install pv: sudo apt-get install pv
pv <file>.sql.bz2 | bunzip2 -c | mysql --host <host> -u admin -p ingresse
// FROM: http://www.mongodb.org/display/DOCS/Updating#Updating-update%28%29
//
// db.collection.update( criteria, objNew, upsert, multi )
// criteria - query which selects the record to update;
// objNew - updated object or $ operators (e.g., $inc) which manipulate the object
// upsert - if this should be an "upsert"; that is, if the record does not exist, insert it
// multi - if all documents matching criteria should be updated
//
// SQL VERSION:
// UPDATE myTable SET dateField = '2011-01-01' WHERE condField = 'condValue'
@hugofcampos
hugofcampos / sublime-text-user-settings.json
Last active March 27, 2019 13:29
Sublime Text User Settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/Dracula Color Scheme/Dracula.tmTheme",
"copy_with_empty_selection": false,
"ensure_newline_at_eof_on_save": true,
"font_options": "subpixel_antialias",
"font_size": 14,
"highlight_line": true,
"ignored_packages":
[
@hugofcampos
hugofcampos / fish-shell-config
Created May 8, 2014 18:11
Fish shell configure to use with Homebrew
set PATH ~/bin $PATH
set PATH /usr/local/bin $PATH
#PHP 5.5 (brew install php55)
set PATH /usr/local/Cellar/php55/5.5.12/bin $PATH