Skip to content

Instantly share code, notes, and snippets.

View sigma's full-sized avatar
🏠
Working from Home

Yann Hodique sigma

🏠
Working from Home
View GitHub Profile
@sigma
sigma / inventory
Last active June 6, 2017 05:49
custom #ansible roles
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 June 5, 2017 01:15
#coreos ovfenv files
# 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 February 5, 2015 21:06
#coreos build script
#!/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 December 17, 2014 20:44
coreos-cloudinit VMware integration
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 August 29, 2015 14:10
vmw-test container run
$ 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 June 23, 2014 00:11
#emacs ReST support for #org tables
(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)
@sigma
sigma / gist:e3191c324ecbf4896019
Created May 1, 2014 20:48
remote fleetctl issue
$ 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 July 23, 2017 23:58
#published getmail ssl #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 June 3, 2017 14:59 — forked from 7hunderbird/1.9.3-p484-railsexpress.md
#ruby 1.9.3-p545 cumulative performance patch for #rbenv

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 February 19, 2014 05:38
run-hook-wrapped compat
(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