Skip to content

Instantly share code, notes, and snippets.

Mark Maglana relaxdiego

Block or report user

Report or block relaxdiego

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
@relaxdiego
relaxdiego / graphite.md
Last active Nov 4, 2019 — forked from surjikal/graphite.md
Installing Graphite in OS X Mavericks
View graphite.md

Follow these steps to install graphite on OS X Mavericks.

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Install dependencies

Install Cairo and friends

@relaxdiego
relaxdiego / install-tmux
Last active May 24, 2019 — forked from rothgar/install-tmux
Install tmux 2.2 on CentOS 7.1
View install-tmux
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
make
sudo make install
View byobu-keybindings.tmux
#
# Installation:
#
# wget -O ~/.byobu/keybindings.tmux byobu.relaxdiego.com
# tmux source-file ~/.byobu/keybindings.tmux
#
unbind-key -n C-a
set -g prefix ^A
set -g prefix2 F12
View noob-automation.sh
#!/bin/bash
set -e
arch=${1:-amd64}
repo=${2:-"http://ftp.us.debian.org/debian/dists/stable/main"}
url="${repo}/Contents-${arch}.gz"
gz_path="$HOME/.deb_content_files/$(sed -r 's|https?://||g' <<< $url)"
txt_path=${gz_path/%.gz/}
@relaxdiego
relaxdiego / in_main.py
Last active Jan 7, 2019
Initialize in main() vs outside main()
View in_main.py
#!/usr/bin/python
from ansible.module_utils.basic import AnsibleModule
def main():
mod = AnsibleModule(
argument_spec=dict(
url=dict(required=True),
dest=dict(required=False, default="/tmp/firstmod")
)
@relaxdiego
relaxdiego / gist:be7b87cae8c2d51d5ee4
Last active Aug 13, 2018 — forked from dayyan/gist:e62bddc65ce1af735f0f
Setting up git send-email in OS X
View gist:be7b87cae8c2d51d5ee4
  1. Configure Gmail in you gitconfig:
[sendemail]
  smtpserver = smtp.gmail.com
  smtpserverport = 587
  smtpencryption = tls
  smtpuser = <gmail email address>
  from = <email address for From: field>
View install-git-completion.sh
GIT_VERSION=`git --version | awk '{print $3}'`
URL="https://raw.github.com/git/git/v$GIT_VERSION/contrib/completion/git-completion.bash"
PROFILE="$HOME/.bash_profile"
echo "Downloading git-completion for git version: $GIT_VERSION..."
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
fi
@relaxdiego
relaxdiego / upload-github-release-asset.sh
Created Jul 4, 2017 — forked from stefanbuck/upload-github-release-asset.sh
Script to upload a release asset using the GitHub API v3.
View upload-github-release-asset.sh
#!/usr/bin/env bash
#
# Author: Stefan Buck
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
# * repo
View guestbook.yml
kind: List
apiVersion: v1
items:
- kind: Namespace
apiVersion: v1
metadata:
name: guestbook
- kind: Deployment
@relaxdiego
relaxdiego / golang-tls.md
Last active May 23, 2017 — forked from denji/golang-tls.md
OpenSSL TLS
View golang-tls.md

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
You can’t perform that action at this time.