Skip to content

Instantly share code, notes, and snippets.

View pansapiens's full-sized avatar

Andrew Perry pansapiens

  • Melbourne, Australia
View GitHub Profile
@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
@ethack
ethack / TypeClipboard.md
Last active May 6, 2024 03:41
Scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 2, 2024 16:19
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@wavezhang
wavezhang / java_download.sh
Last active April 29, 2024 14:42
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
>Illumina Single End Apapter 1
ACACTCTTTCCCTACACGACGCTGTTCCATCT
>Illumina Single End Apapter 2
CAAGCAGAAGACGGCATACGAGCTCTTCCGATCT
>Illumina Single End PCR Primer 1
AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT
>Illumina Single End PCR Primer 2
CAAGCAGAAGACGGCATACGAGCTCTTCCGATCT
>Illumina Single End Sequencing Primer
ACACTCTTTCCCTACACGACGCTCTTCCGATCT
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@jrsa
jrsa / gist:a6c99e4b95a906acc9bed1ed7060ee9b
Last active February 25, 2024 08:00
EN129 VCO Core in falstad
$ 1 0.000005 0.2954511527092107 50 5 50
402 400 496 560 496 1 0\s0\s40\s-9\s0\s0\s0.5 0\s0\s40\s9\s0\s0\s0.5 0\s1\s-12.107891388002887\s0.49020072449645724\s100 0\s1\s-0.49020072449645724\s0.4899458951514504\s100 0\s1\s0\s0.4899458951514504\s100 0\s1\s-3.4423968860970877\s0.48994335934397704\s100 0\s1\s-8.969060690957324\s-4.088038007650795\s100 0\s-1\s0.48993828812503004\s-0.4896834587831105\s100 0\s-1\s0\s-0.4896834587831105\s100 0\s-1\s16.04076664862162\s-0.48993828812503004\s100 0\s-1\s0.0070150138786200245\s-0.02392429516405592\s100 0\s-1\s0\s-0.02392429516405592\s100 0\s-1\s9.993078392331174\s-0.0070150138786200245\s100 0\s1\s0\s0.48967838756419013\s100 0\s1\s-0.4899332169060475\s0.48967838756419013\s100 0\s1\s-6.996370694155912\s0.4899332169060475\s100 0\s1\s0\s-13.57798136396477\s100 0\s1\s0\s-8.999999996969999\s100
w 560 496 576 496 0
w 576 496 592 496 0
g 320 464 320 496 0
w 400 496 384 496 0
r 384 496 384 368 0 15000
r 544 368 544 432 0 1000000
w 544 432 544 464 1
R 544 368 544 336 0 0 40 9 0 0 0.5
@veuncent
veuncent / docker_debugging.md
Last active February 21, 2024 00:58
Debugging Django apps running in Docker using ptvsd - Visual Studio (Code)

Remote debugging in Docker (for Django apps)

In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):

  1. Add ptvsd to your requirements.txt file
ptvsd == 4.3.2
  1. To your launch.json, add this:
@proudlygeek
proudlygeek / nfs-tunnel.md
Last active February 13, 2024 17:00
Mount NFS Folder via SSH Tunnel

1. Install NFS on Server

Install the required packages (Ubuntu 12.04):

apt-get install nfs-kernel-server portmap

2. Share NFS Folder

Open the exports file:

vim /etc/exports
@ForgottenUmbrella
ForgottenUmbrella / publish_python.md
Last active December 25, 2023 21:49
How to publish Python apps for human beings

How to publish Python apps for human beings

So, you've created a Python app (be it a graphical user interface with Qt or the like, or a simple command line interface). Great! But how are others going to use it? Python applications often have dependencies (e.g. from third-party modules), and they also need a Python interpreter to run them. For a developer, installing all the necessary bits and bobs to make things work is okay, but that's unacceptable for a normal user - they just want to download the thing and run it.

Below are simple instructions to publish your app on the three main operating systems: Windows, macOS and Linux.