Skip to content

Instantly share code, notes, and snippets.

@ThomasLeister
ThomasLeister / auto-start-tmux-ssh.txt
Last active March 5, 2025 09:44
Put this into your .bashrc to auto-start a tmux session after SSH login
Put these lines into your server's .bashrc:
##
## TMUX auto attach
##
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then # if this is an SSH session
if which tmux >/dev/null 2>&1; then # check if tmux is installed
if [[ -z "$TMUX" ]] ;then # do not allow "tmux in tmux"
ID="$( tmux ls | grep -vm1 attached | cut -d: -f1 )" # get the id of a deattached session
if [[ -z "$ID" ]] ;then # if not available create a new one
tmux new-session
@deansublett
deansublett / rec_system_movies.ipynb
Created June 5, 2019 17:13
rec_system_movies.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import qupath.lib.scripting.QP
import qupath.lib.geom.Point2
import qupath.lib.roi.PolygonROI
import qupath.lib.objects.PathAnnotationObject
import qupath.lib.images.servers.ImageServer
//Aperio Image Scope displays images in a different orientation
def rotated = false
@nealtodd
nealtodd / wagtail-on-zappa.md
Last active February 18, 2025 15:13 — forked from tomdyson/wagtail-on-zappa.md
Wagtail on AWS Lambda, with Zappa

Wagtail on AWS Lambda, with Zappa

Aim

A demonstration of Wagtail running on AWS Lambda + API Gateway using Zappa for deployment.

This is not a Production solution, it is an insecure setup focusing solely on getting Wagtail to run on Lambda in the simplest way possible (and at zero cost if it is not used beyond this demonstration (or close to zero depending on how much you exercise the S3 bucket)).

caveat emptor!

@radzhome
radzhome / json_schema_to_django_model.py
Last active January 9, 2025 13:11
Converts json schema to django models.py
"""
Json Schema to Django Model
"""
import json
import argparse
import logging
import os
def determine_model_name(model_id=None, filename=None):
@tomdyson
tomdyson / wagtail-on-zappa.md
Last active February 18, 2025 15:12
Wagtail on AWS Lambda, with Zappa

Wagtail on AWS Lambda, with Zappa

Install Wagtail and Zappa, and create an empty site:

pip install wagtail zappa zappa-django-utils
pip install pip==9.0.3 # see https://github.com/Miserlou/Zappa/issues/1471
wagtail start foo
@eddiewebb
eddiewebb / readme.md
Last active April 9, 2025 04:31
Hugo JS Searching with Fuse.js
@DanaCase
DanaCase / AperioToQuPath.groovy
Last active November 21, 2024 15:01
Convert Exported Aperio Image Scope Annotations to QuPath Annotations
import qupath.lib.scripting.QP
import qupath.lib.geom.Point2
import qupath.lib.roi.PolygonROI
import qupath.lib.objects.PathAnnotationObject
import qupath.lib.images.servers.ImageServer
//Aperio Image Scope displays images in a different orientation
def rotated = true
@jkomyno
jkomyno / getGlobalPackages.sh
Created September 28, 2016 10:54
Get every globally install npm package
npm list -g --depth 0
@laurenancona
laurenancona / technocratic-oath.md
Last active February 19, 2021 09:52
technocratic-oath

Technocratic Oath

I swear to fulfill, to the best of my ability and judgment, this covenant:

I will respect the hard-won scientific gains of those physicians in whose steps I walk, and gladly share such knowledge as is mine with those who are to follow.

I will apply, for the benefit of the sick user, all measures which are required, avoiding those twin traps of overtreatment and therapeutic nihilism.

I will remember that there is art to medicine software as well as science, and that warmth, sympathy, and understanding may outweigh the surgeon's knife or the chemist's drug need for another dependency.