Skip to content

Instantly share code, notes, and snippets.

View 3nids's full-sized avatar

Denis Rouzaud 3nids

View GitHub Profile
@3nids
3nids / Convert .mov or .MP4 to .gif.md
Created June 28, 2024 10:48 — forked from SheldonWangRJT/Convert .mov or .MP4 to .gif.md
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

#!/usr/bin/env bash
set -e
MODULE_CODE=Core
MODULE=${MODULE_CODE,,}
ADDSETTING_REG_H_Core=179
ADDSETTING_REG_CPP_Core=137
INCLUDE_REG_CPP_Core=28
@3nids
3nids / settings-migration-helper.sh
Last active March 7, 2022 12:55
QGIS settings migration script
#!/usr/bin/env bash
set -e
if [[ $1 == x ]]; then
set -x
fi
MODULE=core
MODULE_CODE=Core
[
{
"node": {
"author": {
"login": "nyalldawson"
},
"bodyHTML": "<p>This algorithm compares two vector layers, and determines which features<br>\nare unchanged, added or deleted between the two. It is designed for comparing<br>\ntwo different versions of the same dataset.</p>\n<p>When comparing features, the original and revised feature geometries will be<br>\ncompared against each other. Depending on the Geometry Comparison Behavior setting,<br>\nthe comparison will either be made using an exact comparison (where geometries must<br>\nbe an exact match for each other, including the order and count of vertices) or a<br>\ntopological comparison only (where are geometries area considered equal if all of<br>\nthe their component edges overlap. E.g. lines with the same vertex locations but<br>\nopposite direction will be considered equal by this method). If the topological<br>\ncomparison is selected then any z or m values present in the geometries will not<br>\nbe compared.</p>\n<p
#!/usr/bin/env bash
set -e
# This script will use GraphQL Github API to get pull requests on master branch, that has been merged and matching the defined labels (edit the query)
# It will return the last 100 PRs. If totalCount is bigger, you'll need to use pagination in the query
# The results can then be filtered by dates
# You need a GH_TOKEN as env variable
#!/usr/bin/env bash
set -e
# This script will use GraphQL Github API to get pull requests on master branch, that has been merged and matching the defined labels (edit the query)
# It will return the last 100 PRs. If totalCount is bigger, you'll need to use pagination in the query
# The results can then be filtered by dates
FROM_DATE="2019-10-25T00:00:00Z"
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DDPYQT5_SIP_IMPORT=PyQt5.sip \
-DPYQT5_SIP_DIR=/usr/local/share/sip/PyQt5 \
-DSIP_BINARY_PATH=/usr/local/opt/osgeo-sip/bin/sip \
-DSIP_DEFAULT_SIP=/usr/local/share/sip \
-DSIP_INCLUDE_DIR=/usr/local/opt/osgeo-sip/include \
-DSIP_MODULE_DIR=/usr/local/opt/osgeo-sip/lib/python3.7/site-packages \
-DQSCI_SIP_DIR=/usr/local/share/sip/PyQt5/Qsci \
FROM python:3.7
RUN pip install python-slugify pyyaml pytransifex gitpython PyQt5 PyGithub pyqt5ac
RUN echo $(ls /usr/local/lib/python3.7/site-packages/PyQt5/Qt/lib/libQt5Xml.so.5)
RUN python -c "from PyQt5.pylupdate_main import main"
#!/usr/bin/env python3
from github import Github, GithubException
import argparse
import os
GH_TOKEN_ENV_VAR_NAME = 'GH_TOKEN'
GH_REPO_SLUG = 'opengisch/OSGeo4A'
@3nids
3nids / qgis_resize_rectangle_action.py
Created June 27, 2019 09:52
Action to resize rectangles in QGIS 3
layer = QgsProject.instance().mapLayer('[% @layer_id %]')
from math import sqrt
from PyQt5.QtWidgets import QDialog, QFormLayout, QLabel, QDoubleSpinBox, QComboBox, QDialogButtonBox
class RectDialog(QDialog):
def __init__(self, width, length):
QDialog.__init__(self)
self.layout = QFormLayout(self)