Skip to content

Instantly share code, notes, and snippets.

View ldesiqueira's full-sized avatar

Luis Felipe Moura Pereira De Siqueira ldesiqueira

  • Newark, NJ
View GitHub Profile
@ldesiqueira
ldesiqueira / centos6.ks
Created July 31, 2018 23:45 — forked from kenjiskywalker/centos6.ks
CentOS 6.3 install on KVM from kickstart
# Kickstart file automatically generated by anaconda.
#version=RHEL6
install
rootpw --iscrypted [HASH PASSWORD]
text
keyboard us
lang en_US.UTF-8
selinux --disabled
timezone --utc Asia/Tokyo
@ldesiqueira
ldesiqueira / haproxy.cnf
Created January 25, 2018 00:00 — forked from meineerde/haproxy.cnf
Redirect *.example.com to *.example.org with HAProxy
# We use a temporary header to build our new Host header from the existing one
# and then directly perform a redirect
# Clean the request and remove any existing header named X-Rewrite
http-request del-header X-REWRITE
# Copy the Host header into X-Rewrite unchanged
http-request add-header X-REWRITE %[hdr(host)] if { hdr_end(host) .example.com }
# Change the X-REWRITE Header to contain out new host name
@ldesiqueira
ldesiqueira / desktop_to_chef_client.sh
Last active November 26, 2017 21:48
desktop_to_chef_client
# Current Support
# Ubuntu 16.04.3
if ! [ -f /usr/bin/curl ]; then
apt-get install curl -y
fi
if ! [ -f /usr/bin/git ]; then
apt-get install git -y
fi
@ldesiqueira
ldesiqueira / metrics-template.json
Created June 3, 2017 19:23 — forked from tegud/metrics-template.json
Template for using Elasticsearch as a Time Series Database
{
"metrics" : {
"order" : 0,
"template" : "metrics-*",
"settings" : {
"index" : {
"refresh_interval" : "5s"
}
},
"mappings" : {
#!/bin/bash
host=http://localhost:8080
url=/pluginManager/installNecessaryPlugins
# git plugin https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
curl -X POST -d '<jenkins><install plugin="git@2.0" /></jenkins>' --header 'Content-Type: text/xml' $host$url
# artifactory plugin https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin
curl -X POST -d '<jenkins><install plugin="artifactory@2.2.1" /></jenkins>' --header 'Content-Type: text/xml' $host$url
@ldesiqueira
ldesiqueira / haproxy_1_5.cnf
Created November 4, 2016 21:31 — forked from meineerde/haproxy_1_5.cnf
HAPROXY: Redirect all requests to a URL starting with /foo to /bar while retaining everything following it
# In HAProxy 1.5, we have to jump through some hops to accomplish a rewrite of a request's path...
# We use a temporary header to build our new path from the existing one in the request
# and then directly perform a redirect
# Clean the request and remove any existing header named X-Rewrite
http-request del-header X-REWRITE
# Copy the full request URL into X-Rewrite unchanged
http-request add-header X-REWRITE %[url] if { path_beg /foo }
@ldesiqueira
ldesiqueira / Build_Vim7.4_CentOS7.txt
Created August 30, 2016 05:02 — forked from junxie6/Build_Vim7.4_CentOS7.txt
Compile the latest Vim 7.4 on CentOS 7
Compile the latest Vim 7.4 on CentOS 7
# yum install gcc make ncurses ncurses-devel
# yum install ruby ruby-devel lua lua-devel luajit \
luajit-devel ctags git python python-devel \
python3 python3-devel tcl-devel \
perl perl-devel perl-ExtUtils-ParseXS \
perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \
perl-ExtUtils-Embed
@ldesiqueira
ldesiqueira / policies.md
Created July 29, 2016 00:43 — forked from jkeiser/policies.md
Policies and Cookbooks and Groups

The policy resource

You can create Chef machine policies (essentially pinned resources) using the chef_policy resource. When it is done, the policy, and any referenced cookbooks will be on the Chef server.

Specifying via attributes

You can define the policy inline in the file. The most basic version:

@ldesiqueira
ldesiqueira / vim_centos.sh
Created January 31, 2016 01:11 — forked from fundon/vim_centos.sh
install vim 7.3 on centos, debian, arch etc.
#!/bin/bash
# on centos minimal
yum install gcc
yum install make
yum install ncurses-devel
yum install lua lua-devel
yum install ruby ruby-devel
yum install python python-devel
yum install perl perl-devel