Skip to content

Instantly share code, notes, and snippets.

View guiyomh's full-sized avatar
😀

Guillaume Camus guiyomh

😀
View GitHub Profile
@guiyomh
guiyomh / mysqldump_splittable.sh
Last active September 10, 2015 15:52
Split MySQL dump SQL file into one file per table or extract a single table
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump
####
if [ $# -lt 1 ] ; then
echo "USAGE $0 DUMP_FILE [TABLE]"
exit
@guiyomh
guiyomh / gist:a10281a7190acfde4dc4
Last active September 18, 2015 07:43 — forked from AstonJ/gist:2896818
Install/Upgrade Ruby on CentOS 6.2
#get root access
$su -
$ cd /tmp
#Remove old Ruby
$ yum remove ruby
# Install dependencies
$ yum groupinstall "Development Tools"
$ yum install zlib zlib-devel
@guiyomh
guiyomh / config.m4.patch
Last active January 25, 2016 15:43
Install PHP 5.6 and Apache on Centos7 with Webtatic repo
--- PDO_OCI-1.0/config.m4 2005-09-24 23:23:24.000000000 +0000
+++ config.m4 2016-01-23 17:54:09.825493667 +0000
@@ -7,6 +7,8 @@
if test -s "$PDO_OCI_DIR/orainst/unix.rgs"; then
PDO_OCI_VERSION=`grep '"ocommon"' $PDO_OCI_DIR/orainst/unix.rgs | sed 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$PDO_OCI_VERSION" && PDO_OCI_VERSION=7.3
+ elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.11.2; then
+ PDO_OCI_VERSION=11.2
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then
PDO_OCI_VERSION=10.1
@guiyomh
guiyomh / oracle_db_install.rsp
Last active August 31, 2022 21:17
Install Oracle 11gR2 on centos7 x86_64
####################################################################
## Copyright(c) Oracle Corporation 1998,2008. All rights reserved.##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## can help to populate the variables with the appropriate ##
## values. ##
## ##
@guiyomh
guiyomh / .gitconfig
Last active August 16, 2017 11:34
My config git
[core]
autocrlf = false
editor = vim
[color]
ui = auto
[alias]
st = status
ci = commit
cia = commit --amend
co = checkout
@guiyomh
guiyomh / vagrant_get_insecure_key.sh
Created January 23, 2016 16:35
Get insecure key for Vagrant
#!/usr/bin/env bash
wget https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -O .ssh/authorized_keys
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
chown -R vagrant:vagrant .ssh
@guiyomh
guiyomh / .gitattributes
Last active January 25, 2016 15:26
Sample Git Attributes File
# Encrypt the repository
# Remove/modify this line if the repository is meant to be open-source
*.* filter=git-crypt diff=git-crypt
.gitattributes !filter !diff
# These files are text and should be normalized (Convert crlf => lf)
*.php text
*.phtml text
*.twig text
*.css text
@guiyomh
guiyomh / Creating-box.md
Created January 24, 2016 18:05
Atlas Hashicorp Creating Boxes with the API

Creating Boxes with the API

This example uses the Boxes API to upload boxes with curl. To get started, you'll need to get an access token.

Then, prepare the upload:

$ curl 'https://atlas.hashicorp.com/api/v1/box/USERNAME/BOX_NAME/version/VERSION/provider/PROVIDER_NAME/upload?access_token=ACCESS_TOKEN'
@guiyomh
guiyomh / provision-vagrant-bind-proxy.sh
Created January 26, 2016 13:29
Configure a local DNS and a local proxy for resolve local vhost on Centos7
#!/usr/bin/env bash
# @see https://mondedie.fr/viewtopic.php?id=5946
# @see https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-private-network-dns-server-on-centos-7
echo -e "\n--- Installing DNS ---\n"
yum -y install bind bind-utils > /dev/null 2>&1
cp /etc/named.conf /etc/named.conf.ori
sed -i "s/dnssec-validation.*/dnssec-validation auto;/" /etc/named.conf
@guiyomh
guiyomh / Docker_Cleanup.md
Last active March 30, 2016 14:43
Docker Cleanup

Kill all running containers

docker kill $(docker ps -q)

Delete all stopped containers (including data-only containers)

docker rm $(docker ps -a -q)