- QT 5
- PostgreSQL
- Xcode - latest version available
- XML2 library
Discover gists
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
#!/bin/sh | |
# install tools | |
apt update -y && apt install nano wget curl libguestfs-tools -y | |
# remove old image | |
rm -rfv ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img | |
# remove old template container - WILL DESTROY COMPLETELY | |
qm destroy 9000 --destroy-unreferenced-disks 1 --purge 1 | |
# download new image | |
wget http://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img | |
# add agent to image |
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
int save_frame_as_jpeg(AVCodecContext *pCodecCtx, AVFrame *pFrame, int FrameNo) { | |
AVCodec *jpegCodec = avcodec_find_encoder(AV_CODEC_ID_JPEG2000); | |
if (!jpegCodec) { | |
return -1; | |
} | |
AVCodecContext *jpegContext = avcodec_alloc_context3(jpegCodec); | |
if (!jpegContext) { | |
return -1; | |
} |
See how a minor change to your commit message style can make a difference.
Tip
Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs
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 'package:flutter/material.dart'; | |
class FadeOnScroll extends StatefulWidget { | |
final ScrollController scrollController; | |
final double zeroOpacityOffset; | |
final double fullOpacityOffset; | |
final Widget child; | |
FadeOnScroll( | |
{Key key, |
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
// | |
// Levenshtein Distance Function for Google Sheets | |
// | |
// This function calculates de Levenshtein Distance (or Edit Distance) between two strings. | |
// I used the algorith and code from Wikipedia (https://en.wikipedia.org/wiki/Levenshtein_distance) | |
// as a reference and just adjusted the code to be used on Google Sheets. | |
// | |
// By: Manoel Lemos / manoel@lemos.net / http://manoellemos.com | |
// | |
// IMPORTANT: I added some code in the begining of the function to try to solve the issues |
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 tkinter as tk | |
from tkinter import messagebox | |
from tkinter import ttk | |
""" | |
Useful Links: | |
https://stackoverflow.com/questions/7546050/switch-between-two-frames-in-tkinter Most useful in my opinion | |
https://www.tutorialspoint.com/python/python_gui_programming.htm | |
https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/index.html |
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
#!/bin/sh -e | |
# | |
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the | |
# Docker daemon using a JSON config file. On Linux, this file is normally located at | |
# /etc/docker/daemon.json. You should use this JSON config method if you are running | |
# a version of Docker that is at least 1.10! | |
# Here is an example configuration that sets the docker0 bridge IP to 192.168.254.1/24: | |
# { | |
# "bip": "192.168.254.1/24" | |
# } |
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
from __future__ import print_function, unicode_literals | |
import os | |
import json | |
import numpy as np | |
from netCDF4 import Dataset | |
import argparse | |
from argparse import RawDescriptionHelpFormatter |
NewerOlder