UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
- liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
require 'tire' | |
require 'nobrainer' | |
NoBrainer.connect 'rethinkdb://server/company' | |
class Employee | |
include NoBrainer::Document | |
field :name | |
field :title |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {
require 'socket' | |
# 1. Create | |
# AF_INET means IPv4 (xxx.xxx.xxx.xxx) | |
# SOCK_STREAM means communicating with a stream (TCP) | |
# | |
# Can be simplified to symbols :INET and :STREAM, respectively | |
server = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM) |
Brought to you by Headjack
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.
Let's start with some basics:
ffmpeg
calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe fileThis documentation adds important additions to the docs for mrsk deploy tool (see github.com/mrsked/mrsk)
You can use mrsk deploy --destination staging
This will read config/deploy.yml and config/deploy.staging.yml files, and also will read .env.staging file if it exists.
registry-github: &docker | |
username: username | |
password: | |
- DOCKER_TOKEN | |
registry-internal: &internal | |
server: registry.example.com | |
username: testuser | |
password: testpassword123 | |
# This uses YAML magic and Ruby template language to select registry on the fly | |
registry: *<%= ENV["MRSK_REGISTRY"] || 'internal' %> |
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |