Skip to content

Instantly share code, notes, and snippets.

@vrillusions
vrillusions / README.mkd
Created April 29, 2013 20:15
Generate gpg key via batch file

Introduction

This is how to create a gpg key without any user interaction or password. This can be used in cases where the primary goal is to secure the data in transit but the gpg key can/must be stored locally without a password. An example of this is the hiera-gpg plugin which doesn't support passwords.

The below genkey-batch file will use the default which currently are RSA/RSA and 2048 bit length. See the reference link to set this to something else.

References

@vrillusions
vrillusions / config
Created March 13, 2014 22:47
Example of a `~/.ssh/config` file which makes it easier to login to different servers
# ssh(1) obtains configuration data from the following sources in the following order:
#
# 1. command-line options
# 2. user's configuration file (~/.ssh/config)
# 3. system-wide configuration file (/etc/ssh/ssh_config)
#
# For each parameter, the first obtained value will be used. The configuration files contain sections separated
# by “Host” specifications, and that section is only applied for hosts that match one of the patterns given in the
# specification. The matched host name is the one given on the command line.
#
@vrillusions
vrillusions / _README.mkd
Last active January 24, 2023 16:18
Kickstart for Ubuntu 14.04
@vrillusions
vrillusions / .gitattributes
Last active April 18, 2020 08:48
Example .gitattributes
# Normalize line endings of text files
* text=auto
# Add exclusions here after running reset operation
#bin/** -text
# Ignore files on running `git archive`
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
@vrillusions
vrillusions / example.pp
Last active December 7, 2018 13:40
Purging unmanaged yumrepo resources in puppet v3.5+
# This was tested on puppet v3.6.1 but believe the fix was in v3.5
yumrepo { 'epel':
ensure => present,
baseurl => 'http://whatever'
...
}
# This purges any yumrepo resource that isn't specified anywhere in manifest.
# On node run `puppet resource yumrepo` to get a list of all yumrepo resources
@vrillusions
vrillusions / shell.sh
Last active October 29, 2018 20:51
workflow to filter out several folders from a git repo.
git clone example.com:/url/to/project.git
cd project
# these next few commands show how to rename branch "mybranch" to master
git checkout mybranch
git branch -d master
git checkout -b master
git branch -d mybranch
# remove orgin to make sure we don't accidentally do anything there
git remote rm origin
# none of the tags apply to mybranch
@vrillusions
vrillusions / hob064.rule.txt
Last active October 2, 2018 13:39
Hob0Rules explained
# This taken from https://github.com/praetorian-inc/Hob0Rule and I wanted to
# look up what all these meant. So using the documentation[1] here's what all
# these mean. The explanation precedes each pattern and the example input
# word is superman
#
# These are the most common substitutions people do when creating passwords.
# Thus it would be in your best interest to not choose a password that would
# match any of these patterns or almost match when given a dictionary of
# common words.
#
@vrillusions
vrillusions / local_pip_cache.sh
Created May 1, 2018 15:36
How to install python packages completely from local files
# Original use case for this is on a jenkins server where jobs wipe their working
# directories and wipes the virtual environment with it. Was abandoned as we just
# got a regular caching server that it uses
# run these at initial setup and if requirements or pip version changes
# and yes old version of pip used `pip install --download` and newer versions
# use `pip download`.
mkdir -p "${HOME}/.cache/pip/localcache"
pip install --download "${HOME}/.cache/pip/localcache" -U pip setuptools
pip install --no-index --find-links="${HOME}/.cache/pip/localcache" -U pip setuptools
@vrillusions
vrillusions / brew-list-detailed.sh
Created December 10, 2013 17:49
Show detailed information for all installed homebrew packages.
#!/bin/bash
# This shouldn't fall under copywrite law but just in case:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
@vrillusions
vrillusions / css_resources.md
Created November 21, 2013 15:53 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides