Skip to content

Instantly share code, notes, and snippets.

View benjaoming's full-sized avatar

Benjamin Balder Bach benjaoming

View GitHub Profile
@Howard3
Howard3 / typeahead_result.gohtml
Created May 11, 2023 15:09
HTMX/AlpineJS TypeAhead.
{{define "content"}}
<div id="results">
{{if or .Notice .Error}}
{{if .Error}}
<div
class="alert flex rounded-lg border border-error px-4 py-4 text-error sm:px-5"
>
{{.Error}}
</div>
{{else}}
@apollo13
apollo13 / pyproject.toml
Last active June 2, 2023 10:13
OwnCloud/NextCloud emulator
[tool.poetry]
name = "owncloudemulator"
version = "0.1.0"
description = ""
authors = ["Florian Apolloner <florian@apolloner.eu>"]
[tool.poetry.dependencies]
python = "^3.7"
starlette = "^0.13.0"
uvicorn = "^0.10.8"
@afriza
afriza / install-nginx-rtmp-module.sh
Last active December 31, 2023 22:04
Install NGINX RTMP module with HLS support on Ubuntu 18.04
sudo apt install curl gnupg2 ca-certificates lsb-release
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
sudo apt update
NGINX_VERSION=$(apt show nginx | grep "^Version" | cut -d " " -f 2 | cut -d "-" -f 1)
# take note of the nginx version in the "stable" release. e.g. 1.14.2
echo NGINX version $NGINX_VERSION
wget https://hg.nginx.org/pkg-oss/raw-file/default/build_module.sh
chmod a+x build_module.sh
@mgedmin
mgedmin / ppa-gtimelog-copy-packages.py
Created November 28, 2013 09:16
Automate PPA package copies, version 2.
#!/usr/bin/python
"""Copy published precise PPA packages to quantal raring saucy.
Typical usage:
- build a gtimelog package for precise
- dput ppa:gtimelog-dev gtimelog_0.8.1-0ppa0_source.changes
- wait for it to be built
- run ppa-gtimelog-copy-packages
@jbenet
jbenet / simple-git-branching-model.md
Last active November 9, 2024 04:55
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active November 2, 2024 06:45
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active February 23, 2023 15:03
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@djangofan
djangofan / endorsedmethod.java
Last active January 6, 2023 22:05
Exercise on safely waiting for unstable web elements with WebDriver.
// This is the official Selenium documention endorsed method of waiting for elements.
// This method is ineffective because it still suffers from
// the stale element exception.
public static void clickByLocator ( final By locator ) {
WebElement myDynamicElement = ( new WebDriverWait(driver, 10))
.until( ExpectedConditions.presenceOfElementLocated( locator ) );
myDynamicElement.click();
}