Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
import 'l10n/app_localizations.dart'; // L10N
class AppLocale extends StatelessWidget {
const AppLocale({ Key key, this.locale, this.child }) : super(key: key);
final Locale locale;
final Widget child;
@amfasis
amfasis / main.cpp
Created March 19, 2019 12:33
StackOverflow - Create ListView/ListModel from a vector of strings
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include "myClass.h"
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
@mrbar42
mrbar42 / README.md
Last active February 25, 2026 23:47
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@appleboy
appleboy / gitea_install.md
Last active January 20, 2024 09:48
how to install gitea in Ubuntu/Debian.

Gitea

Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket or Gitlab. The initial development have been done on Gogs but we have forked it and named it Gitea. If you want to read more about the reasons why we have done that please read this blog post.

Run Gitea service

Download Gitea binary from download page first.

$ wget https://dl.gitea.io/gitea/1.1.0/gitea-1.1.0-linux-amd64 -O gitea
@kocisov
kocisov / next_nginx.md
Last active February 3, 2025 07:27
How to setup next.js app on nginx with letsencrypt
@nepsilon
nepsilon / how-to-git-patch-diff.md
Last active April 25, 2026 14:06
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff &gt; some-changes.patch
@mattetti
mattetti / multipart_upload.go
Last active March 6, 2026 07:32
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"