Skip to content

Instantly share code, notes, and snippets.

@trumant
trumant / missing_files_script_directions.md
Last active Aug 21, 2019
Find missing files directions
View missing_files_script_directions.md
  1. Download the file here
  2. Create a file on your Desktop named search_files.txt. Each line of the file should be a single filename. Example:
file_one.jpg
file_two.jpg
file_three.jpg
  1. Open Terminal.app
  2. Run the following commands in Terminal, pressing Return after each one:
  3. bash
@trumant
trumant / find_missing.sh
Created Aug 21, 2019
Missing files script for Niamh
View find_missing.sh
#!/usr/bin/env bash
while IFS= read -r f; do
if [ $(find "$2" -name "$f") ]; then
continue
else
printf "\033[1;31m$f not found\e[0m\n"
fi
done < "$1"
@trumant
trumant / exif.rb
Created Feb 26, 2017
Exif processing with Ruby
View exif.rb
#!/usr/bin/env ruby
require "mini_exiftool_vendored"
require 'mini_exiftool'
images_directory = ARGV[0]
puts "Processing images in directory: #{images_directory}"
images_list = Dir.entries(images_directory).reject{ |d| d.start_with?(".") }.reject {|d| !d.end_with?("jpg") }.sort
View keybase.md

Keybase proof

I hereby claim:

  • I am trumant on github.
  • I am trumant (https://keybase.io/trumant) on keybase.
  • I have a public key ASBgYzpQl2ymLBpg5zNwlsRksI9n_koUvGo0MBLXeCzaVwo

To claim this, I am signing this object:

View gist:82bf9a63c73fb6694d15356b7d64c6ed
TASK: os_gnocchi : Install pip packages (1 retries left).Result was: {
"attempts": 5,
"cmd": "/openstack/venvs/gnocchi-untagged/bin/pip2 install -U --constraint /opt/developer-pip-constraints.txt --constraint http://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt --no-binary libvirt-python gnocchi[mysql file swift ceph] keystonemiddleware gnocchiclient python-memcached pycrypto",
"failed": true,
"invocation": {
"module_args": {
"chdir": null,
"editable": true,
"executable": null,
"extra_args": "--constraint /opt/developer-pip-constraints.txt --constraint http://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt --no-binary libvirt-python",
@trumant
trumant / overrides.yml
Created Aug 25, 2016
nova conf overrides
View overrides.yml
---
nova_nova_conf_overrides:
DEFAULT:
vcpu_pin_set: {{ nova_compute_pin_set }}
@trumant
trumant / user_variables.yml
Last active Aug 18, 2016
user_variables.yml example for Ceilometer config_overrides
View user_variables.yml
ceilometer_ceilometer_conf_overrides:
database:
metering_time_to_live: 300
event_time_to_live: 300
View gist:302ff73dd17f7e7637dfff1fd37dbca0
rabbit://neutron:7a75d07f7db2743019cd584e85d451f6cd00cdf9d909efca267f745@192.168.1.212:5671,neutron:7a75d07f7db2743019cd584e85d451f6cd00cdf9d909efca267f745@192.168.1.109:5671,neutron:7a75d07f7db2743019cd584e85d451f6cd00cdf9d909efca267f745@192.168.1.194:5671//neutron?rabbit_use_ssl=True
@trumant
trumant / user_variables.yml
Created Jul 27, 2016
Sample OpenStack-Ansible DVR with OVS configuration
View user_variables.yml
# Ensure the openvswitch kernel module is loaded
openstack_host_specific_kernel_modules:
- name: "openvswitch"
pattern: "CONFIG_OPENVSWITCH="
group: "network_hosts"
### Neutron specific config
neutron_plugin_type: ml2.ovs.dvr
neutron_ml2_drivers_type: "flat,vlan"
@trumant
trumant / validate-instance-connectivity-example.sh
Created Jul 26, 2016
OpenStack-Ansible OVS validate instance connectivity example
View validate-instance-connectivity-example.sh
ssh man1.oslab
lxc-attach -n `lxc-ls | grep neutron_agents_`
# ping provider instance from the provider network namespace
ip netns exec `ip netns | grep UUID_OF_PROVIDER_NETWORK` \
ping -c 3 PROVIDER_INSTANCE_IP
# ping project instance from the project network namespace
ip netns exec `ip netns | grep UUID_OF_PROJECT_NETWORK` \
ping -c 3 PROJECT_INSTANCE_IP