Skip to content

Instantly share code, notes, and snippets.

carloswherbet

Block or report user

Report or block carloswherbet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@carloswherbet
carloswherbet / ubuntu_ldap_auth.sh
Created Dec 28, 2017 — forked from ahamilton55/ubuntu_ldap_auth.sh
Ubuntu Client Auth over LDAP
View ubuntu_ldap_auth.sh
#!/bin/bash
# Set environment vars for a silent install through apt-get
export DEBIAN_FRONTEND=noninteractive
export DEBIAN_PRIORITY=critical
# Install the LDAP utilities
apt-get -y install libpam-ldap libnss-ldap nss-updatedb libnss-db
# Reset environment vars for apt-get
@carloswherbet
carloswherbet / Gemfile
Created May 23, 2017 — forked from rubencp/Gemfile
Override Confirm dialog Rails 4 and Bootbox.js
View Gemfile
gem 'bootbox-rails', '~>0.3'
View pre-commit
#!/usr/bin/env ruby
# This pre-commit hook will prevent any commits to forbidden branches
# It will also help prevent you leaving debuggers and merge conflig flags
# Put this file in your local repo, in the .git/hooks folder
# and make sure it is executable by running: chmod u+x pre-commit
# The name of the file *must* be "pre-commit" for Git to pick it up.
class String
def black; "\e[30m#{self}\e[0m" end
@carloswherbet
carloswherbet / post-receive
Created Oct 5, 2016 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
View post-receive
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@carloswherbet
carloswherbet / .gitconfig
Created Oct 5, 2016 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
View .gitconfig
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
View Sendy - Nginx
server {
listen 80;
listen [::]:80;
server_name domain.com;
autoindex off;
index index.php index.html;
root /srv/www/domain.com/public;
@carloswherbet
carloswherbet / crossbuild_qt5_for_rpi.sh
Last active Aug 29, 2015 — forked from Jokymon/crossbuild_qt5_for_rpi.sh
Protocol from Cross compiling Qt5 for Raspberry Pi
View crossbuild_qt5_for_rpi.sh
set -e
PREFIX=~/opt/qt5pi
ROOTFS_MOUNT=/mnt/rasp-pi-rootfs
# On Ubuntu 14.04 do the following first to get the ia32-lib
if [ `lsb_release -ds` -eq "Ubuntu 14.04 LTS" ]
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
fi
You can’t perform that action at this time.