Skip to content

Instantly share code, notes, and snippets.

@krkeegan
krkeegan / generatecloudmap.py
Last active May 30, 2023 21:42
Missed an ampersand
'''
A Script for automatically downloding earth based image tiles and stitching
them into a single image file. Designed for downloading and stitching together
a cloud map file for use with xplanet. But it could be used for other things.
Images are obtained from the Space Science and Engineering Center (SSEC)
at the University of Wisconsin-Madison through their RealEarth project.
RealEarth is a data discovery and visualization platform developed at
SSEC/CIMSS at the University of Wisconsin-Madison to support outreach
and collaboration efforts of scientists.
@dberstein
dberstein / README.md
Last active November 12, 2023 09:01
Git commit hook that prepends message with Jira issue(s) found in branch name (PR branch) otherwise requires message contains at least one Jira issue

With this commit-msg git hook and your branch names have Jira reference(s), your commit messages will be automatically updated to include any missing reference(s) too.

Installation

Place contents of this gist's commit-msg file into your checkout's .git/hooks/commit-msg file and make it executable.

Bash

cd path/to/your/git/checkout \
&& install -vbm 755 <(curl -s https://gist.githubusercontent.com/dberstein/dcc50e171163c3f6e0f23b2b5de5dd49/raw/5e5372ff22a872321ad1f5469a4d579c15ce498a/commit-msg) "$(git rev-parse --git-dir)/hooks/commit-msg"
@mjackson
mjackson / multiple-git-hooks.sh
Created February 6, 2018 00:58
Run multiple scripts for the same git hook
#!/bin/sh
# This script should be saved in a git repo as a hook file, e.g. .git/hooks/pre-receive.
# It looks for scripts in the .git/hooks/pre-receive.d directory and executes them in order,
# passing along stdin. If any script exits with a non-zero status, this script exits.
script_dir=$(dirname $0)
hook_name=$(basename $0)
hook_dir="$script_dir/$hook_name.d"
@jaymzznoori
jaymzznoori / Example.qml
Last active November 27, 2016 21:59
Example for Sailfish UI programming in QML
import QtQuick 2.0
import Sailfish.Silica 1.0
ApplicationWindow {
// Chapter 1: Basic primitives
Image {
visible: false
source: "jolla.png"
Behavior on opacity { NumberAnimation {} }
#!/bin/sh
# Bail on errors!
set -e
set -u
# Change to a temporary directory:
cd /tmp
# Version of Syncthing we'll install:
@kblomqvist
kblomqvist / githook-astyle.sh
Last active September 9, 2022 13:04
Git pre-commit hook to check C/C++ source file format using astyle (Artistic Style)
#!/bin/bash
# Installation:
# cd my_gitproject
# wget -O pre-commit.sh http://tinyurl.com/mkovs45
# ln -s ../../pre-commit.sh .git/hooks/pre-commit
# chmod +x pre-commit.sh
OPTIONS="-A8 -t8 --lineend=linux"
RETURN=0
@cnlpete
cnlpete / gatherimages.sh
Created August 12, 2014 19:33
metapixel-helper to gather images and sort them via metapixel-sizesort and afterwards use prepare them via metapixel-prepare with appropriate aspect ratios
#!/bin/zsh
convert=/usr/bin/convert
metapixelsizesort=/usr/bin/metapixel-sizesort
dir=$1
targetdir=$2
root=`pwd`
# If there is no version tag in git this one will be used
VERSION = 0.1.0
# Need to discard STDERR so get path to NULL device
win32 {
NULL_DEVICE = NUL # Windows doesn't have /dev/null but has NUL
} else {
NULL_DEVICE = /dev/null
}
@nbergont
nbergont / slideshow.qml
Last active March 12, 2019 10:01
QML slideshow with KenBurns effect
import QtQuick 2.0
import Qt.labs.folderlistmodel 2.0
/**
--- QML Ken Burns slideshow ---
Work well on Raspberry Pi (resize image 1920*1600 max before ...)
call :
qmlscene slideshow.qml path="/home/img"
qmlscene.exe slideshow.qml path="/C:/test/img"
**/
Rectangle {
@notadecent
notadecent / tox.sh
Last active June 17, 2019 15:55
toxcore installer script, for Gentoo, Arch, Red Hat, SuSE, Fedora, Debian, Mint, Ubuntu and their derivativesInstalls dependencies and toxic, venom and nurupo's Qt GUI
#!/bin/bash
## wget -O tox.sh waa.ai/iqt && chmod +x ./tox.sh && ./tox.sh
## ./tox.sh -sl to skip libsodium (they don't update that often)
## ./tox.sh -sd to skip libsodium and all the other dependencies
## If libraries are missing, remove /etc/ld.so.conf.d/locallib.conf and
## try running again. Else, try messing around with the prefix paths.
## Suggestions, comments and the alike are welcome on http://waa.ai/4xtC
## or send me a mail, to notadecent AT tox DOT im