Skip to content

Instantly share code, notes, and snippets.

@ducan-ne
ducan-ne / Caddyfile
Last active December 24, 2023 17:45
Dockerfile "zero-config" over 35 frameworks. "One Dockerfile to rule them all"
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
Note: I don't know where does this thread belongs. If I'm on the incorrect section, move it to the correct one.
Many people are literally just selling this method and I feel like sharing this out so that you don't have to pay because the seller just don't do a minute of work to get you the drive.
So moving straight towards the method:
Step I:
Go to this link: https://td.fastio.me/ (mirrors to be left at the last)
Step II:
Type your desired drive's name at the first field and your Gmail on the bottom field.
@akella
akella / setup.md
Last active May 1, 2024 05:33
My Setup
@ledongthuc
ledongthuc / Readme.md
Last active March 23, 2020 08:19
[Github Actions][Go] Check pull requests before merging

Create template actions that's used to verify Go language pull requests before merging. It's easy to custom the flow, tools with your case.

Put pr_checker.yml or pr_checker_simple.yml to .github/workflows/ and see how it works with your pull requests. Make sure you are allows to use actions of Github.

  • pr_checker.yml is using by mine with full checking tools. It will make sure every Go langauge pull requests will be buildable, testable, passed security checking and error-able code checking.
  • pr_checker_simple.yml is more simpler with buildable, testable.

References:

@luciofm
luciofm / DebounceLiveData.kt
Created May 13, 2019 16:11
A Debouncing LiveData helper
class DebounceLiveData<Source>(
private val source: LiveData<Source>,
private val debounceMs: Long
) : LiveData<Source>(), CoroutineScope {
private val job = SupervisorJob()
override val coroutineContext: CoroutineContext
get() = Dispatchers.Main + job
private var debounceJob: Job? = null
private val observer = Observer<Source> { source ->
//Abstração
class TestLiveData<T, Q> : TestLiveDataI<T, Q> {
val success = MutableLiveData<T>()
val loading = MutableLiveData<Boolean>()
val error = Event<Q>()
override fun successLiveData(): LiveData<T> = success
override fun loadingLiveData(): LiveData<Boolean> = loading
override fun errorLiveData(): LiveData<Q> = error
@Quipyowert2
Quipyowert2 / FOSS Alternatives to Adobe's Premiere Pro.md
Created April 28, 2019 01:18
FOSS Alternatives to Adobe's Premiere Pro

Open Source Video Editors:

  1. Blender - I'm not sure if this one counts since it is more of a CAD program than a video editor.

  2. Avidemux:

Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting.

  1. OpenShot:
@Tapchicoma
Tapchicoma / DownloadDependenciesTask.kt
Last active May 1, 2020 15:19
Download all Gradle project dependecies
import org.gradle.api.DefaultTask
import org.gradle.api.artifacts.Configuration
import org.gradle.api.attributes.Attribute
import org.gradle.api.model.ObjectFactory
import org.gradle.api.tasks.*
import org.gradle.kotlin.dsl.setProperty
import java.io.File
import javax.inject.Inject
/**
@rabssm
rabssm / ffmpegtips.txt
Last active June 30, 2023 12:43
ffmpeg tips
# Interpolate video frames for a higher frame rate
ffmpeg -i source.mp4 -filter:v minterpolate -r 25 result.mp4
ffmpeg -i source.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 result.mp4
# Crop a video to the bottom right quarter
ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4
# Resize a video to half size
ffmpeg -i input.mkv -filter_complex "scale=in_w/2:in_h/2" output.mkv
@mzaidannas
mzaidannas / Simple Docker Setup with Rails+Nginx+Redis+Postgres.md
Last active March 26, 2024 19:55
Simple Docker Setup with Rails+Nginx+Redis+Postgres.md

Typical rails setup with docker+puma+nginx+postgres

Zaid Annas

Devsinc inc. 30/08/2018

Overview