Skip to content

Instantly share code, notes, and snippets.

Juan Lagostena jplagostena

Block or report user

Report or block jplagostena

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
@mavieth
mavieth / install-php-7.sh
Created May 2, 2017
Upgrade from PHP 5.X.X to PHP 7 on an AWS EC2 Linux Server
View install-php-7.sh
#!/bin/bash
echo "==============================="
echo "Installing PHP 7"
echo "==============================="
sudo yum install php70
echo "==============================="
echo "Installing PHP 7 additional commonly used php packages"
echo "==============================="
View Single item from stream
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collector;
import java.util.stream.Collectors;
public class StreamUtils {
public static <T> Collector<T, ?, T> singletonCollector() {
@dangreaves
dangreaves / README.md
Last active May 19, 2019
Installing Sentry on Debian
View README.md

Installing Sentry on Debian

Install aptitude packages

sudo apt-get update
sudo apt-get install python python-setuptools python-pip python-dev libxslt1-dev libxml2-dev libmysqlclient-dev

Install and activate virtualenv

sudo pip install -U virtualenv
virtualenv /clients/sentry/
source /clients/sentry/bin/activate
@mgedmin
mgedmin / gist:9547214
Created Mar 14, 2014
Setting up a Jenkins slave on Linux
View gist:9547214
# This is how you add a Jenkins slave
# On master:
sudo -u jenkins -H ssh-keygen
# On slave
adduser --system --group --home=/var/lib/jenkins-slave --no-create-home --disabled-password --quiet --shell /bin/bash jenkins-slave
install -d -o jenkins-slave -g jenkins-slave /var/lib/jenkins-slave
@sindresorhus
sindresorhus / post-merge
Last active Aug 22, 2019
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
View post-merge
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
You can’t perform that action at this time.