Skip to content

Instantly share code, notes, and snippets.

View gravyboat's full-sized avatar

Forrest gravyboat

View GitHub Profile
If you have 2-3 huge pdf (or epub or other formats, read below) files to compare , then it is possible to combine the power of:
calibre (to convert your source to text)
meld (to visually search for the differences between the text files)
parallel (to use all your system cores to speed up)
Below script accept as input any of the following file formats: MOBI, LIT, PRC, EPUB, ODT, HTML, CBR, CBZ, RTF, TXT, PDF and LRS.
@gravyboat
gravyboat / gist:4a81ac0d183ab2093697
Created May 26, 2015 18:58
multiple installs, single ID
install_gstreamer:
pkg.installed:
- pkgs:
- gstreamer0.10
- gstreamer0.10-dev
- gstreamer0.10-whatever
@gravyboat
gravyboat / |srv|pillar|app-1.sls
Created May 18, 2015 23:07
Multiple pillars, had to use | for directories instead of slashes because gist.
app_1:
nginx_url: http://my-awesome-site.com
base_ec2_private:
provider: my-ec2-us-east-private-ips
image: ami-018c9568
size: Micro Instance
ssh_username: ubuntu
base_ec2_public:
provider: my-ec2-us-east-public-ips
image: ami-018c9568
size: Micro Instance
@gravyboat
gravyboat / git.sls
Created August 15, 2014 21:33
pillar values
https://github.com/saltstack/salt.git:
git.latest:
{% if salt['pillar.get']('git:env') == 'dev' %}
- rev: acbdf23098ff
{% else %}
- rev: acbdfdf232jkjd9
{% endif %}
- target: /tmp/salt
@gravyboat
gravyboat / install_npm.sls
Created August 14, 2014 21:26
npm repo and installation
add_npm_repo:
pkgrepo:
- managed
- ppa: chris-lea/node.js
- name: nodejs
install_nodejs:
pkg:
- installed
- name: nodejs
#!/bin/bash
# basically delete all signs of previous id and data
# and start over
/etc/init.d/salt-minion stop
rm -Rf /var/cache/salt/minion
rm /etc/salt/minion_id
rm -Rf /etc/salt/pki
@gravyboat
gravyboat / .aptly.conf
Created August 11, 2014 22:15
aptly formula
{
"rootDir": "{{ salt['pillar.get']('aptly:rootdir') }}",
"downloadConcurrency": 4,
"architectures": [],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": false,
"dependencyFollowSource": false,
"gpgDisableSign": false,
"gpgDisableVerify": false,
/etc/mysql/my.cnf:
file.managed:
- source: salt://database/config_files/master/my.cnf
- user: root
- group: root
- mode: 644
- template: jinja
- defaults:
innodb_buffer_pool_size: {{ pillar.db_config.innodb_buffer_pool_size }}
join_buffer_size: {{ pillar.db_config.join_buffer_size }}
@gravyboat
gravyboat / install_package.sls
Last active August 29, 2015 14:04
basic usage of watch_in
my_package:
pkg:
- installed
- name: awesome_software
awesome_software_service:
service:
- running
- enable: True