Skip to content

Instantly share code, notes, and snippets.

@zuazo
zuazo / emuparadise.py
Last active May 21, 2021 16:09 — forked from fopina/emuparadise.py
Scraper script for emuparadise.me modified to support roms with multiple links (e.g. Dreamcast)
#!/usr/bin/env python
"""
Scraper script for emuparadise.me
Forked from https://gist.github.com/fopina/8d2ce0b0b03f34e117dd
Modified to support roms with multiple download links like Dreamcast games.
Usage
=====
@zuazo
zuazo / hb_all_books_dl.js
Last active September 10, 2022 14:36 — forked from p0kR/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
Forked from https://gist.github.com/p0kR/95e05e689be4e59b1b8fb6e383b9e25a
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
this fork downloads all formats and does so without using jquery (since that didnt work for me)
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this
Settings (chrome://settings) --> Advanced --> Privacy and security --> Content settings --> PDF documents --> Download PDF files instead of automatically opening them in Chrome --> Turn ON

Keybase proof

I hereby claim:

  • I am zuazo on github.
  • I am zuazo (https://keybase.io/zuazo) on keybase.
  • I have a public key whose fingerprint is ADAE EEFC BD78 6CBB B76B 1662 2195 FF19 5324 14AB

To claim this, I am signing this object:

@zuazo
zuazo / cookbook_name_from_directory.rb
Created July 27, 2015 18:19
Get Chef cookbook name from cookbook directory
#!/usr/bin/env ruby
#
# Syntax:
# $ cookbook_name_from_directory.rb [DIRECTORY]
#
require 'stringio'
require 'chef/cookbook/metadata'
@zuazo
zuazo / Chef-metadata-environment-pattern.rb
Last active November 17, 2016 08:58
This Chef Cookbook metadata.rb example reads the dependencies from Berksfile.lock. (Experimental)
# metadata.rb
# This metadata.rb example reads the dependencies from Berksfile.lock. This can
# be used to implement the Environment Pattern with Chef Server.
#
# The Environment Cookbook:
# http://blog.vialstudios.com/the-environment-cookbook-pattern/
name 'my_face'
# [...]
@zuazo
zuazo / Chef-recipe-block-fork.rb
Last active August 29, 2015 14:07
Chef examples for recipe_block and recipe_fork implementations
def recipe_block_run(&block)
@run_context.resource_collection = Chef::ResourceCollection.new
instance_eval(&block)
Chef::Runner.new(@run_context).converge
end
def recipe_block(description, &block)
recipe = self
ruby_block "recipe_block[#{description}]" do
block do
@zuazo
zuazo / Chef-Berksfile.rb
Last active February 4, 2016 02:55
Berksfile template for a Chef Cookbook
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
# More info at http://berkshelf.com/#the-berksfile
source 'https://supermarket.chef.io'
my_cookbook = ::File.basename(Dir.pwd).sub(/[-_]?cookbook$/, '')
# Berkshelf helper to include a local cookbook from disk.
@zuazo
zuazo / Chef-Rakefile.rb
Last active May 23, 2019 13:39
Rakefile template for a Chef Cookbook: YARD, RuboCop, foodcritic, ChefSpec, Test Kitchen
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Available Rake tasks:
#
# $ rake -T
# rake clean # Clean some generated files
# rake default # Run doc, style, unit and integration tests
@zuazo
zuazo / Chef-Gemfile.rb
Last active April 17, 2020 18:59
Gemfile template for a Chef Cookbook
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
# More info at http://bundler.io/gemfile.html
source 'https://rubygems.org'
# Used when running the tests against different Chef versions:
chef_version = ENV.key?('CHEF_VERSION') ? ENV['CHEF_VERSION'] : nil
@zuazo
zuazo / Chef-Guardfile.rb
Last active February 4, 2016 03:01
Guardfile template for a Chef Cookbook
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
# More info at https://github.com/guard/guard#readme
# Style Tests
# ===========
# - Foodcritic
# - RuboCop