Skip to content

Instantly share code, notes, and snippets.

View TTimo's full-sized avatar

Timothee "TTimo" Besset TTimo

View GitHub Profile
@TTimo
TTimo / gist:267db48c0f20b06c6be1dfd05cd9ff56
Last active May 2, 2018 16:46
File descriptor redirections and capture magic
#!/usr/bin/env python
# python 2.7 and >= 3.4 supported
from __future__ import print_function
import sys
if (sys.version_info < (3, 0)):
assert(sys.version_info >= (2, 7))
else:
#!/bin/bash -x
# TTimo
echo vrmonitor.sh STEAM_RUNTIME: $STEAM_RUNTIME
TOOLSDIR=$(cd $(dirname $0)/..; pwd)
RUNTIMEDIR=$(cd $TOOLSDIR/../runtime; pwd)
case $(uname) in
Darwin)
diff --git a/salt/cloud/clouds/ec2.py b/salt/cloud/clouds/ec2.py
index 2b2e258231..9a534d97d2 100644
--- a/salt/cloud/clouds/ec2.py
+++ b/salt/cloud/clouds/ec2.py
@@ -2224,6 +2224,9 @@ def wait_for_instance(
use_winrm = config.get_cloud_config_value(
'use_winrm', vm_, __opts__, default=False
)
+ winrm_verify_ssl = config.get_cloud_config_value(
+ 'winrm_verify_ssl', vm_, __opts__, default=True
#!/usr/bin/env python
# gdb command files are seriously limited and inconvenient
# fortunately there is python scripting
# source from the gdb CLI:
# (gdb) source /opt/Valve/mesa.gdb.py
import os
import gdb
ver='3.9'
Section "Monitor"
Identifier "BENQ"
Option "Primary" "true"
EndSection
Section "Monitor"
Identifier "HMD"
EndSection
Section "Device"
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.EwmhDesktops
import XMonad.Actions.GroupNavigation
import XMonad.Layout.NoBorders
import XMonad.Layout.Gaps
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
@TTimo
TTimo / gist:179653f97e02ecc75e91
Created July 21, 2015 18:23
chocolatey pip installation failed
Chocolatey v0.9.9.8
Installing the following packages:
pip
By installing you accept licenses for the packages.
easy.install v0.6.11.4
Setting PYTHONHOME environment variable to 'C:\Python27'
PS: PYTHONHOME variable is not required to Python works, but it is a good practice to have it.
Using python home at 'C:\Python27'
Installing easy_install for Python(2.7.6)...
@TTimo
TTimo / gist:cc1d7e827df9e1c51999
Created February 10, 2015 17:01
An un-handled exception was caught by salt's global exception handler
[ERROR ] An un-handled exception was caught by salt's global exception handler:
TypeError: string indices must be integers, not str
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 123, in salt_call
client.run()
File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 410, in run
caller = salt.cli.caller.Caller.factory(self.config)
File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 64, in factory
@TTimo
TTimo / index.html
Created December 20, 2014 17:57
jErXEL
<html>
<head>
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"/>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.2.0/knockout-min.js"/>
</head>
<body>
</body>
</html>
sshd_root_login:
file.replace:
- name: /etc/ssh/sshd_config
- pattern: ".*PermitRootLogin .*"
- repl: "PermitRootLogin no"
ssh:
service.restart:
- onchanges:
- file: sshd_root_login