Skip to content

Instantly share code, notes, and snippets.

Pablo Serrano pserrano

Block or report user

Report or block pserrano

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

Keybase proof

I hereby claim:

  • I am pserrano on github.
  • I am pserrano ( on keybase.
  • I have a public key ASAKSE_1tOOTC2BUStfG3jAMp5r75NTaGO6_cBpWya_saQo

To claim this, I am signing this object:

pserrano / server.json
Created Nov 14, 2018
Packer with ansible solution for AWS
View server.json
"variables": {
"profile": "aws1",
"region": "eu-east-1",
"ssh_keypair_name": "private",
"ssh_private_key_file": "$HOME/.ssh/private.pem"
"provisioners": [
pserrano / hosts_ansible_vagrant
Last active Jan 15, 2018
Ssh into a vagrant machine with ansible
View hosts_ansible_vagrant
#search ssh file key of machine with 'vagrant ssh-config | grep IdentityFile' ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.ssh/id_rsa
View gist:99968d26eed4a492d1c0e3cd40be3c0b
#To start using your cluster, you need to run (as a regular user):
sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf
pserrano / gitreset
Created Sep 14, 2017
Remove commit and revert
View gitreset
git reset --hard <commit-hash>
git push -f origin master
DIRS=($(ls -d */))
for i in "${DIRS[@]}"; do
if [[ "$i" == "parameters/" ]] || [[ "$i" == "jenkinsfile/" ]]; then
cd $i; PARA=($(ls -d */));
echo $i
for j in "${PARA[@]}"; do
echo $j
pserrano / php_append.php
Created Sep 9, 2016
php_append.php auto_append_file fpm memory check process
View php_append.php
#Memory check process for fpm
$logline = sprintf(date("Y-m-d H:i:s") . "\t" . round(memory_get_peak_usage() / 1024 / 1024,2) . " MB\t" . $_SERVER["REQUEST_URI"] . "\n");
file_put_contents("/var/log/nginx/fpm_memory.log", $logline, FILE_APPEND | LOCK_EX);
pserrano / yosemite ntfs read+write.txt
Last active Oct 17, 2015 — forked from bjorgvino/yosemite ntfs read+write.txt
osxfuse + ntfs-3g + Yosemite = NTFS R/W
View yosemite ntfs read+write.txt
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
View gist:2a919f248bf74fe31972
LINT_IGNORES = ['rvm']
namespace :lint do
desc "Check puppet module code style."
task :ci do
require 'puppet-lint'
rescue LoadError
fail 'Cannot load puppet-lint, did you install it?'
pserrano / backup.php
Last active Aug 29, 2015 — forked from Serhioromano/backup.php
Backup EC2 EBS automatic snapshot for all volumes if you want backup for all.
View backup.php
#!/usr/bin/php -q
$dryrun = FALSE;
$interval = '24 hours';
$keep_for = '10 Days';
$volumes = array('vol-********');
$api_secret = 'IzMni.........................emQKct';
You can’t perform that action at this time.