Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from Home

Yann Hodique sigma

🏠
Working from Home
View GitHub Profile
@sigma
sigma / inventory
Last active Jun 6, 2017
custom #ansible roles
View inventory
localhost ansible_connection=local
coreos181 ansible_ssh_host=172.16.78.181
coreos182 ansible_ssh_host=172.16.78.182
coreos183 ansible_ssh_host=172.16.78.183
[core]
coreos181
coreos182
coreos183
@sigma
sigma / 90-ovfenv.rules
Last active Jun 5, 2017
#coreos ovfenv files
View 90-ovfenv.rules
# Automatically trigger ovfenv mounting.
ACTION!="add|change", GOTO="coreos_ovfenv_end"
# A normal config drive. Block device formatted with iso9660 or fat
SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="iso9660|vfat", ENV{ID_FS_LABEL}=="OVF ENV", TAG+="systemd", ENV{SYSTEMD_WANTS}+="media-ovfenv.mount"
LABEL="coreos_ovfenv_end"
@sigma
sigma / build_coreos.sh
Created Feb 5, 2015
#coreos build script
View build_coreos.sh
#!/bin/bash
MANIFEST_URL=${MANIFEST_URL:-https://github.com/coreos/manifest.git}
MANIFEST_REF=${MANIFEST_REF:-master}
MANIFEST_LAYOUT=${MANIFEST_LAYOUT:-minilayout}
MANIFEST_NAME=${MANIFEST_NAME:-release.xml}
BUILD_ID=${BUILD_ID:-`date +%s`}
CORE_PASSWD=${CORE_PASSWD:-plop}
@sigma
sigma / gist:4c2e61118ea8392e9958
Created Dec 17, 2014
coreos-cloudinit VMware integration
View gist:4c2e61118ea8392e9958
core@localhost ~ $ docker run sigma/vmw-vmtest
You are running on VMware Workstation/Fusion
An OVF environment is defined: <?xml version="1.0" encoding="UTF-8"?>
<Environment xmlns="http://schemas.dmtf.org/ovf/environment/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oe="http://schemas.dmtf.org/ovf/environment/1"
oe:id="CoreOSNode1"> <PlatformSection>
<Kind>vapprun</Kind>
<Version>1.0</Version>
<Vendor>VMware, Inc.</Vendor>
@sigma
sigma / plop.txt
Last active Aug 29, 2015
vmw-test container run
View plop.txt
$ docker run sigma/vmw-vmtest
You are running on VMware ESX(i)
An OVF environment is defined: <?xml version="1.0" encoding="UTF-8"?>
<Environment
xmlns="http://schemas.dmtf.org/ovf/environment/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oe="http://schemas.dmtf.org/ovf/environment/1"
xmlns:ve="http://www.vmware.com/schema/ovfenv"
oe:id=""
ve:vCenterId="vm-96699">
@sigma
sigma / orgtbl-config.el
Created Jun 23, 2014
#emacs ReST support for #org tables
View orgtbl-config.el
(defun yh/orgtbl-to-rst-paddings (table)
(let* ((pruned-table (remove 'hline table))
(size-table (mapcar (lambda (row)
(mapcar #'length row))
pruned-table)))
(apply #'mapcar* #'max size-table)))
(defun yh/orgtbl-padded-hline (paddings &optional chr)
(let ((chr (or chr ?-)))
(concat (format "+%c" chr)
View gist:e3191c324ecbf4896019
$ fleetctl --tunnel cluster list-machines
mainLoop: unhandled message *ssh.kexInitMsg: &{[14 161 26 14 37 61 28 35 18 21 221 235 94 153 11 243] [curve25519-sha256@libssh.org diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1 diffie-hellman-group14-sha1 diffie-hellman-group1-sha1] [ssh-rsa ssh-dss] [aes128-ctr aes192-ctr aes256-ctr arcfour256 arcfour128 aes128-gcm@openssh.com aes256-gcm@openssh.com chacha20-poly1305@openssh.com aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc aes256-cbc arcfour rijndael-cbc@lysator.liu.se] [aes128-ctr aes192-ctr aes256-ctr arcfour256 arcfour128 aes128-gcm@openssh.com aes256-gcm@openssh.com chacha20-poly1305@openssh.com aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc aes256-cbc arcfour rijndael-cbc@lysator.liu.se] [hmac-md5-etm@openssh.com hmac-sha1-etm@openssh.com umac-64-etm@openssh.com umac-128-etm@openssh.com hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com hmac-ripemd160-etm@openssh.com hmac-sha1-96-etm@openssh.com hmac-md5-96
@sigma
sigma / ssl_timeout.patch
Last active Jul 23, 2017
#published getmail ssl #patch
View ssl_timeout.patch
diff --git a/getmailcore/retrievers.py b/getmailcore/retrievers.py
index c0f6580..37e21dc 100755
--- a/getmailcore/retrievers.py
+++ b/getmailcore/retrievers.py
@@ -402,8 +402,7 @@ class SimpleIMAPSSLRetriever(IMAPRetrieverBase, IMAPSSLinitMixIn):
ConfInstance(name='configparser', required=False),
ConfDirectory(name='getmaildir', required=False, default='~/.getmail/'),
- # socket.ssl() and socket timeouts are incompatible in Python 2.3
- #ConfInt(name='timeout', required=False, default=180),
@sigma
sigma / 1.9.3-p484-railsexpress.md
Last active Jun 3, 2017 — forked from 7hunderbird/1.9.3-p484-railsexpress.md
#ruby 1.9.3-p545 cumulative performance patch for #rbenv
View 1.9.3-p484-railsexpress.md

ruby-1.9.3-p545 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p545 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@sigma
sigma / gist:9086618
Created Feb 19, 2014
run-hook-wrapped compat
View gist:9086618
(unless (fboundp 'run-hook-wrapped)
(defun run-hook-wrapped-1 (hook funcs wrap-function &rest args)
(loop for f in funcs
if (and (eq f t)
(local-variable-p hook)
(default-boundp hook)
(apply 'run-hook-wrapped-1
nil (default-value hook) wrap-function args))
return it