Skip to content

Instantly share code, notes, and snippets.

View patlachance's full-sized avatar

Patrice Lachance patlachance

View GitHub Profile
@patlachance
patlachance / stackato.yml
Created June 25, 2012 05:09 — forked from troytop/stackato.yml
stackato.yml for redmine
name: redmine
instances: 1
mem: 256M
framework:
type: rails3
services:
redmine-postgresql: postgresql
# env:
#!/bin/sh
# This is a sample script for kickstarting a VM according to the openshift.ks script under virt-manager, qemu+KVM, and Linux.
# You certainly need to modify at least the CMDLINE and --location below for it to be useful (unless you work at Red Hat).
set -e
if [ $# -lt 1 ]
then
printf 'Usage: %s vm_name [arg1 [arg2 [...]]]\n' "$0"
@patlachance
patlachance / gist:2533275743e6e2a8c78c
Created January 17, 2016 21:10 — forked from gmasse/gist:4b0c34be3d797cd729d2
OVH custom iPXE boot (dedicated server)

iPXE customer script (BETA)

Booting your server with your own iPXE script allows cool things like:

  • running diskless bare-metal system like CoreOS, SmartOS, ...
  • recovering with your own Rescue system or bare-metal restore tools (like Acronis and Idera)
  • launching Standard installer like ESXi, Linux, Solaris, ...

How ? Using directly the RESTful API EU|CA or the API console EU|CA.

@patlachance
patlachance / gist:b681ac4101dd3e078ad1
Created January 21, 2016 07:05
CentOS 7 Chainloaded by iPXE - network not working
net0: 172.31.47.39/255.255.240.0 gw 172.31.32.1
http://169.254.169.254/latest/user-data... ok
http://mirror.centos.org/centos-7/7/os/x86_64/isolinux/vmlinuz.img... ok
http://mirror.centos.org/centos-7/7/os/x86_64/isolinux/initrd.img... ok
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015
[ 0.000000] Command line: console=hvc0 console=tty0 console=ttyS0 ip=dhcp inst.repo=http://mirror.centos.org/centos-7/7/os/x86_64 inst.vnc inst.vncpassword=XXXXXXXX inst.headless inst.lang=en_US inst.keymap=us rd.driver.pre=xen_netfront,xennet,netfront
[ 0.000000] e820: BIOS-provided physical RAM map:
@patlachance
patlachance / config-ddwrt-rw.sh
Created June 29, 2017 17:39 — forked from valtoni/config-ddwrt-rw.sh
Config Read Write mode in DD WRT Router
# From: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=86912
# 1. Prepare the USB disk
# Create an ext3 partition using GParted for instance
#2. Configure DD-WRT
#Under Services->Services->Secure Shell:
#* Enable SSHd
#* Click Apply Settings
#
@patlachance
patlachance / upload-github-release-asset.sh
Created June 29, 2018 15:22 — forked from stefanbuck/upload-github-release-asset.sh
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name yourdomain
ssl_certificate /etc/ssl/localcerts/yourdomain.crt;
ssl_certificate_key /etc/ssl/localcerts/yourdomain.key;
ssl_ecdh_curve prime256v1;
ssl_session_cache builtin:1000 shared:SSL:10m;
@patlachance
patlachance / GIT_SSH_COMMAND.sh
Created August 16, 2018 14:16 — forked from larryli/GIT_SSH_COMMAND.sh
Git ssh socks proxy
#!/bin/sh
export GIT_SSH_COMMAND='ssh -o ProxyCommand="connect -S 127.0.0.1:1080 %h %p"'
git config --global core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:1080 %h %p"'
git clone -c=core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:1080 %h %p"' git@github.com:larryli/ipv4.git
git config core.sshCommand 'ssh -o ProxyCommand="connect -S 127.0.0.1:1080 %h %p"'

Keybase proof

I hereby claim:

  • I am patlachance on github.
  • I am lachance (https://keybase.io/lachance) on keybase.
  • I have a public key ASDHkv3RdgZV1mhNtsVlnxoZ6ClNxUNSkA4il3oOKGihMAo

To claim this, I am signing this object:

@patlachance
patlachance / GoogleSpreadsheet.html
Created April 19, 2020 08:02 — forked from terrywbrady/GoogleSpreadsheet.html
Sample HTML/JS to parse a Google Spreadsheet
<!doctype html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var spData = null;
function doData(json) {
spData = json.feed.entry;
}