Skip to content

Instantly share code, notes, and snippets.

@ckandoth
ckandoth / install_nextflow_singularity.md
Last active May 7, 2024 13:28
Install conda and use it to install nextflow and singularity

This guide will show you how to install conda and then use it to install nextflow and singularity for executing popular bioinformatics workflows. Unfortunately, singularity is not available on Windows or macOS. So, this guide will only target Linux environments. If you have to use Windows 10, then try WSL2. If you have to use macOS, then try a Virtual Machine.

Download the Miniconda3 installer for Linux environments:

curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh

Install into a folder named miniconda3 under your home directory, and delete the installer:

bash miniconda.sh -bup $HOME/miniconda3 && rm -f miniconda.sh
@MarcoLizza
MarcoLizza / scale_rotate.c
Last active May 7, 2024 13:28
Fast scale-and-rotate blit.
typedef unsigned char Pixel_t;
typedef struct _Point_t {
int x, y;
} Point_t;
typedef struct _Rectangle_t {
int x, y;
int width, height;
} Rectangle_t;
@romkatv
romkatv / migrate-zsh-dotfiles.zsh
Last active May 7, 2024 13:27
Migrate zsh dotfiles from the home directory to another directory on the same machine
# This command moves your zsh dotfiles (.zshrc, .zsh_history, etc.)
# from the home directory to ~/.config/zsh. It's been verified to
# work correctly if you are using zsh4humans. With other zsh configs
# your mileage may vary.
#
# How to:
#
# 1. Close all terminals except one.
# 2. Copy-paste this command into the only remaining terminal.
() {
@hyjk2000
hyjk2000 / .alacritty.yml
Created February 12, 2020 08:48
Alacritty with Tmux Setup
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
@HogeBlekker
HogeBlekker / flask.tsx
Last active May 7, 2024 13:27
Grafana Canvas Panel custom experimental element
import React from 'react';
import { ColorDimensionConfig, ScalarDimensionConfig } from '@grafana/schema';
import { DimensionContext } from 'app/features/dimensions';
import { ColorDimensionEditor, ScalarDimensionEditor } from 'app/features/dimensions/editors';
import { CanvasElementItem, CanvasElementProps, defaultBgColor } from '../element';
interface FlaskData {
height: number;
@kolebynov
kolebynov / Program.cs
Created May 7, 2024 13:15
Simple stack/heap dynamic array
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
var list1 = new FixedList16<int>();
var list2 = new FixedList32<int>();
UseList(ref list1, 1);
UseList(ref list2, 2);
static void UseList<TItem, TList>(ref TList list, TItem item)
where TItem : unmanaged
@wozulong
wozulong / issues_baipiao_checker.py
Last active May 7, 2024 13:26
检查issues里的白嫖者,自动关闭+加标签+锁定
import requests
issue_labels = ['no respect']
github_repo = '<owner>/<repo>'
github_token = '<github token>'
headers = {
'Authorization': 'Bearer ' + github_token,
'Accept': 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
}
@chroming
chroming / 软件备忘.md
Created March 18, 2019 13:41
个人对于(开源)软件的评价列表

软件备忘

Linux桌面发行版

根据多年(也不多)的折腾经验,考虑发行版

  • 首先考虑对软件包管理的喜好,与健壮的软件仓库
  • 其次考虑默认的桌面环境(默认的桌面环境往往优化、整合得更好)
  • 作为桌面系统,尽可能地不折腾

在此基础上,个人喜好为:

@AndersonFirmino
AndersonFirmino / velocity-plus.sh
Last active May 7, 2024 13:26
Programas que ajudam a melhorar desempenho Linux/Pc modestos
#!/bin/sh
# script para instalar programas que ajudam no desempenho.
echo "Esta de acordo em fazer o upgrade? (digite: ok e tecle enter se sim) "
read certeza
if [ "$certeza" = "ok" ]
then
sudo apt-get install zram-config -y
sudo apt-get install preload -y
sudo apt-get install prelink -y
@truemogician
truemogician / upgrading_postgresql_in_windows.md
Last active May 7, 2024 13:26
Upgrading PostgreSQL in Windows

Upgrading PostgreSQL in Windows

The official documentation for PostgreSQL provides a guide to upgrading using pg_upgrade. However, it can be a bit like a treasure hunt with hidden traps. This gist will walk you through a clear and robust method for upgrading PostgreSQL on Windows, using the upgrade from version 14 to 16 as an example.

1. Install the New Version of PostgreSQL

Before you embark on the upgrade journey, make sure you have the new version installed. This is because the pg_upgrade utility used during the upgrade process belongs to the newer version.

To get started, visit the official download page, download the installer, and run it. A word of caution: do not overwrite the old installation, as you'll need its binaries and data for the upgrade.