def adjust_metadata(folder_path)
pattern = /(\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}_\d{3})\.\w+$/
Dir.foreach(folder_path) do |file|
next if file == '.' || file == '..'
match = file.match(pattern)
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
file, err := os.Create("output.txt") | |
if err != nil { | |
log.Fatalf("Failed to create file: %s", err) | |
} | |
defer file.Close() | |
for key, value := range files { | |
line := fmt.Sprintf("%s: %s\n", key, value) | |
_, err := file.WriteString(line) | |
if err != nil { |
ffmpeg -y -i input.mov -r 30 -t 2.99 -an -c:v libvpx-vp9 -pix_fmt yuva420p -vf 'scale=512:512:force_original_aspect_ratio=decrease' output.webm
Here is a breakdown of the options:
-y
- Overwrite the output file if it already exists.
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
(() => { | |
// config: | |
const likea = true // like all (skip next two if true) | |
const tsize = 128 // minimal amount of letters in bio | |
const regex = /no fwb/i // dislike if found | |
const likes = 1000 // maximal likes per run | |
const speed = 1 // timeout to let it be preloaded | |
const timeo = 51 // timeout to let bio be loaded | |
const msgtm = 200 // timeout on match | |
// ^ |
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
# State interface | |
class TrafficLightState | |
def change_state(_traffic_light) | |
raise 'This method should be implemented in a subclass' | |
end | |
def display_color | |
raise 'This method should be implemented in a subclass' | |
end | |
end |
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
// Code generated by protoc-gen-go. DO NOT EDIT. | |
// versions: | |
// protoc-gen-go v1.28.0 | |
// protoc v3.19.4 | |
// source: review.proto | |
package storage | |
import ( | |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"protobuftest/storage" | |
"github.com/go-redis/redis/v8" | |
"google.golang.org/protobuf/proto" | |
) |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/go-redis/redis/v8" | |
) | |
func main() { |
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
class App | |
attr_reader :queue | |
def initialize | |
@queue = [] | |
end | |
def call | |
puts "App PID: #{Process.pid}" | |
publish |
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
class App | |
attr_reader :queue | |
def initialize | |
@queue = [] | |
end | |
def call | |
puts "App PID: #{Process.pid}" | |
publish |
NewerOlder