Skip to content

Instantly share code, notes, and snippets.

View randysecrist's full-sized avatar

Randy Secrist randysecrist

View GitHub Profile
@randysecrist
randysecrist / gitlab_prune_artifacts.rb
Created November 10, 2020 17:42
clean gitlab artifacts
#! /usr/bin/ruby
begin
require 'net/http'
require 'json'
rescue LoadError
puts 'Required dependencies are not installed. Please install the following:'
puts '\'net/http\', \'json\''
puts 'Then try again.'
exit
@bryant988
bryant988 / zillow.js
Last active July 21, 2024 06:49
Zillow Image Downloader
/**
* NOTE: this specifically works if the house is for sale since it renders differently.
* This will download the highest resolution available per image.
*/
/**
* STEP 1: Make sure to *SCROLL* through all images so they appear on DOM.
* No need to click any images.
@stemwinder
stemwinder / ffmpeg-multi-instances-xargs.md
Created October 7, 2017 18:07 — forked from Brainiarc7/ffmpeg-multi-instances-xargs.md
This gist will show you how to launch multiple ffmpeg instances with xargs, very useful for NVIDIA NVENC based encoding where standard GPUs limit the maximum simultaneous encode sessions to two.

Spawning multiple ffmpeg processes with xargs:

On standard NVIDIA GPUs (Not the Quadros and Tesla lines), NVENC encodes are limited to two simultaneous sessions. The sample below illustrates how to pass a list of AVI files to ffmpeg and encode them to HEVC on two encode sessions:

$ find Videos/ -type f -name \*.avi -print | sed 's/.avi$//' |\
  xargs -n 1 -I@ -P 2 ffmpeg -i "@.avi" -c:a aac -c:v hevc_nvenc "@.mp4"

This will find all files with the ending .avi in the directory Videos/ and transcode them into HEVC/H265+AAC files with the ending .mp4. The noteworthy part here is the -P 2 to xargs, which starts up to two processes in parallel.

@c0deWranglr
c0deWranglr / Consul.scala
Last active October 5, 2017 16:49
Registers an sbt project with consul at a specified port
/*
To install, simple put this file in the global sbt plugins directory.
For sbt 0.13 that would be ~/.sbt/0.13/plugins/
To use, just call sbt "consul -p <port>" to register any project with consul at <port>
or sbt "consul -d" to deregister this project from consul
or sbt "consul -x" to deregister all sbt projects from consul
To save the port for automatic loading, run sbt "consul -p <port> -s".
*/
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@drewkerrigan
drewkerrigan / setup.md
Last active July 12, 2018 14:31
simple Riak default schema search setup

Simple Search 2.0 Setup

Create an index
curl -i -XPUT http://localhost:8098/search/index/my_index
Link the index to a bucket
@jj1bdx
jj1bdx / erlang-17.0-rc2-wx-osx.md
Last active August 29, 2015 13:56
Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installing wxWidgets

@dankerrigan
dankerrigan / search_getting_started.sh
Last active January 3, 2016 12:59
Getting started with Riak 2.0 Search
# Create an index
curl -XPUT -i 'http://localhost:8098/search/index/user_index'
# Create and activate a Riak bucket-type
riak-admin bucket-type create data '{"props":{}}'
riak-admin bucket-type activate data
# Associate the index with the bucket, users
curl -i -H 'content-type: application/json' -X PUT 'http://localhost:8098/types/data/buckets/users/props' -d '{"props":{"search_index":"user_index"}}'
@drewkerrigan
drewkerrigan / YOKOZUNA.md
Last active July 12, 2019 21:01
Yokozuna Setup

Create a schema based on the default one

https://github.com/basho/yokozuna/blob/develop/priv/default_schema.xml

Upload your schema

curl -XPUT -H 'Content-Type: application/xml'  http://localhost:8098/search/schema/drew_schema --data-binary @"my_schema.xml"
@kenrett
kenrett / Selenium Cheat Sheet.md
Last active May 25, 2023 01:28
Selenium Cheat Sheet - Ruby

#Getting Started

##Webpage:

<html>
<head>
    <title>Testing with Ruby and Selenium WebDriver</title>
</head>
 
<body bgcolor="antiquewhite">