Skip to content

Instantly share code, notes, and snippets.

@cro
cro / pyproject.toml
Created April 11, 2022 22:01
Pyproject.toml demonstrating poetry issue
[tool.poetry]
name = "testpkg"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "^3.9"
salt = "^3004.1"
@cro
cro / validate_pillar.py
Created April 18, 2017 15:39
Git pre-commit script for git-pillar that validates content against a voluptuous schema.
#!/usr/bin/env python
# coding: utf-8
'''
Validate input file(s) against a Voluptuous schema
Pass a dash to read from stdin.
'''
from __future__ import print_function
import imp
@cro
cro / gist:7ba2010723718ff5bfaf
Created August 25, 2014 21:15
pycrypto.sls
disable_libgmp_warning:
file.replace:
- name: /usr/lib64/python2.6/site-packages/Crypto/Util/number.py
- pattern: 'if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:'
- repl: '#if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:'
disable_RandomPool_warning_line1:
file.replace:
- name: /usr/lib64/python2.6/site-packages/Crypto/Util/randpool.py
- pattern: 'warnings.warn\("This application uses RandomPool'
- repl: '#warnings.warn\("This application uses RandomPool'

Keybase proof

I hereby claim:

  • I am cro on github.
  • I am cro (https://keybase.io/cro) on keybase.
  • I have a public key whose fingerprint is FA18 3254 A665 A70C EA77 5644 89C8 496D B285 E5AF

To claim this, I am signing this object:

fileserver_backend:
- git
- roots
gitfs_remotes:
- file:///git/thorium
/var/www/.ssh/ssc_deployment.key:
file.managed:
- user: www-data
- group: www-data
- dir_mode: '0700'
- file_mode: '0600'
- source: salt://ssc/ssc_deployment.key
- makedirs: True
root@ip-10-86-14-69:~# salt ip-10-86-13-65.eu-west-1.compute.internal grains.item appready
ip-10-86-13-65.eu-west-1.compute.internal:
appready: False
root@ip-10-86-14-69:~# salt ip-10-86-13-65.eu-west-1.compute.internal cmd.run 'grep appready /etc/salt/grains'
ip-10-86-13-65.eu-west-1.compute.internal:
appready: true
root@ip-10-86-14-69:~# salt ip-10-86-13-65.eu-west-1.compute.internal mine.update
ip-10-86-13-65.eu-west-1.compute.internal:
True
root@ip-10-86-14-69:~#
@cro
cro / vagrant.log
Created September 7, 2013 21:42
Full log of failing 'vagrant up' with Fusion provider when gui is not turned on.
INFO global: Vagrant version: 1.3.1
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagr
ant-1.3.1/plugins/commands/box/plugin.rb
INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagr
ant-1.3.1/plugins/commands/destroy/plugin.rb
INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagr
ant-1.3.1/plugins/commands/halt/plugin.rb
INFO manager: Registered plugin: halt command
@cro
cro / gist:4262119
Created December 11, 2012 21:02
My slate config
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY
alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY
alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY