A Pen by Vincent Voyer on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sets the proxy cache path location, max size 2g | |
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g; | |
# transfers the `Host` header to the backend | |
proxy_set_header Host $host; | |
# uses the defined STATIC cache zone | |
proxy_cache STATIC; | |
# cache 200 10 minutes, 404 1 minute, others status codes not cached |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo aptitude install ffmpeg | |
sudo aptitude install imagemagick | |
# fps=1 > every seconds | |
ffmpeg -i video.mp4 -f image2 -vf fps=fps=1 out%d.png | |
# horizontal sprite, resized at 30% | |
convert -resize 30% +append out*.png sprite-1-sec.png | |
# references: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Slack emoji |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Label, ModelType, Version } from "@customTypes/templates"; | |
export default class Segmentation { | |
constructor( | |
public b64_mask = "", | |
public label = Label.Uncategorized, | |
public main_colors = "", | |
public model_type = ModelType.Free, | |
public model_version = Version.UnknownVersion, | |
public no_objects = false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ label: "Arabic", value: "ar-AR" }, | |
{ label: "Danish", value: "da-DK" }, | |
{ label: "German", value: "de-DE" }, | |
{ label: "English", value: "en-US" }, | |
{ label: "Spanish (Spain)", value: "es-ES" }, | |
{ label: "Spanish (Latin America)", value: "es-419" }, | |
{ label: "Finnish", value: "fi-FI" }, | |
{ label: "French", value: "fr-FR" }, | |
{ label: "Hebrew", value: "he-IL" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# Similar to docker-compose.yml but not the same, 🤷♂️ | |
services: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2020-01-09T10:25:40.0633699Z ##[section]Starting: Request a runner to run this job | |
2020-01-09T10:25:40.2395888Z Requesting a hosted runner in current repository's account/organization with labels: 'ubuntu-latest', require runner match: True | |
2020-01-09T10:25:40.2946255Z Labels matched hosted runners has been found, waiting for one of them get assigned for this job. | |
2020-01-09T10:25:40.3373017Z ##[section]Finishing: Request a runner to run this job | |
2020-01-09T10:25:47.7137594Z Current runner version: '2.163.1' | |
2020-01-09T10:25:47.7138909Z Prepare workflow directory | |
2020-01-09T10:25:47.7363087Z Prepare all required actions | |
2020-01-09T10:25:47.7388745Z Download action repository 'actions/checkout@v2' | |
2020-01-09T10:25:49.6391641Z Download action repository 'eregon/use-ruby-action@master' | |
2020-01-09T10:25:49.8696320Z Download action repository 'actions/cache@v1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function spr() { | |
remoteOrigin=$(git remote get-url origin) | |
originGitHubUser=${remoteOrigin#git@github.com:*} | |
originGitHubUser=${originGitHubUser%%/*} | |
if [[ $1 == "--"* ]] # spr --branch | |
then | |
params=(${@:1}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var workers = [ | |
{name: 'worker1', fn: function(task, cb) {/* some async processing */}}, | |
{name: 'worker2', fn: function(task, cb) {/* some async processing */ }} | |
]; | |
var tasks = ['one']; // this will be filled with a first task and then filled with more tasks from the workers | |
// I want to distribute tasks to workers, each worker can process only one task at a time | |
// workers will add more tasks while processing | |
// in some situations tasks may be empty and all workers processing |
NewerOlder