Skip to content

Instantly share code, notes, and snippets.

View dikiprawisuda's full-sized avatar

Diki Prawisuda dikiprawisuda

View GitHub Profile
@lpheller
lpheller / tldr-global-gitignore-ds-store.sh
Created November 11, 2020 08:51
Globally ignore .DS_Store files
# Quick and easy one line command to setup a global .gitignore file and ignore macOS .DS_store files globally
git config --global core.excludesfile "~/.gitignore" && echo .DS_Store >> ~/.gitignore
@Thell
Thell / Basic-RStudio-WSL2-Install.md
Last active May 21, 2022 17:19
A very basic, no-frills, setup of RStudio on WSL2.

VERY Basic WSL2 RStudio Install

Begin with a plain Ubuntu distro from the Windows App Store. If one is already installed and you want to start from scratch simply:

wsl -t Ubuntu
wsl --unregister Ubuntu
Ubuntu
@mutterer
mutterer / white_balance_from_grey_area.ijm
Created June 5, 2019 08:10
white_balance_from_grey_area corrects an RGB image white balance using a reference ROI
setBatchMode(1);
t=getTitle();
getBoundingRect(x, y, width, height);
run("Select None");
run("Duplicate..." , "title=ori duplicate");
makeRectangle(x, y, width, height);
run("RGB Stack");
run("32-bit");
id=getImageID;
run("Duplicate..." , "title=temp duplicate");
@kauffmanes
kauffmanes / install_anaconda.md
Last active November 27, 2025 21:47
Install Anaconda on Windows Subsystem for Linux (WSL)

Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.

This article is also on my blog, too.

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Ana
@DarwinAwardWinner
DarwinAwardWinner / analyze_pkg_usage.R
Last active February 12, 2025 16:27
Script for finding loaded but unused packages in R scripts
#!/usr/bin/env Rscript
suppressPackageStartupMessages({
library(globals)
library(readr)
library(stringr)
library(rex)
library(magrittr)
library(rlang)
library(knitr)
@bmaupin
bmaupin / free-backend-hosting.md
Last active December 1, 2025 21:03
Free backend hosting
@Svidro
Svidro / !Making Measurements in QuPath
Last active November 21, 2025 18:32
Making Measurements in QuPath
Collections of scripts harvested mainly from Pete, but also picked up from the forums
TOC
Accessing dynamic measurements.groovy - Most annotation measurements are dynamically created when you click on the annotation, and
are not accessible through the standard getMeasurement function. This is a way around that.
Affine transformation.groovy - access more accurate measurements for the affine transformation used in the image alignment (m5/m6+)
Alignment of local cells.groovy - check neighborhood for similarly aligned cells
@fasiha
fasiha / DictionaryOfJapaneseGrammar.csv
Created December 15, 2017 04:39
All example sentences from Seiichi Makino and Michio Tsutsui's series of three Japanese grammar dictionaries: "Dictionary of Basic Japanese Grammar", "Intermediate" and "Advanced
We can't make this file beautiful and searchable because it's too large.
Number,Expression,Translation,Reading,Grammar Japanese,Grammar English,Grammar Explanation,Notes,Picture,Page,Level,Scrambled
1,私は良子に花をあげた・あげました。,I gave Yoshiko flowers.,私[わたし]は 良子[りょうこ]に 花[はな]をあげた・あげました。,あげる,,give | Someone gives something to a person who is not a member of the giver’s in group but whose status is about equal to that of the giver.,,,63,Basic,
2,大野さんは山本さんに本をあげた。,Ms. Ono gave Mr. Yamamoto a book.,大野[おおの]さんは 山本[やまもと]さんに 本[ほん]をあげた。,あげる,,give | Someone gives something to a person who is not a member of the giver’s in group but whose status is about equal to that of the giver.,,,63,Basic,scrambled
3,君はアンに何をあげましたか。,What did you give to Ann?,君[きみ]はアンに 何[なに]をあげましたか。,あげる,,give | Someone gives something to a person who is not a member of the giver’s in group but whose status is about equal to that of the giver.,,,63,Basic,scrambled
4,私は信男さんにネクタイを買ってあげた・あげました。,I bought a tie for Nobuo.,私[わたし]は 信男[のぶお]さんにネクタイを 買[か]ってあげた・あげました。,あげる,,do s.t. for s.o.; do s.o. a favor by doing s.t. |&nbs
@stephenturner
stephenturner / keybindings.json
Created May 31, 2017 21:04
VSCode keybindings to replicate my most commonly used RStudio shortcuts (Mac)
// Place your key bindings in this file to overwrite the defaults
[
// RStudio: Copy lines up/down with alt+cmd+up/down
{
"key": "alt+cmd+down",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+down",
@ipurusho
ipurusho / STAR.md
Last active July 10, 2025 09:47
A brief tutorial on how to run the STAR aligner on medinfo.mssm.edu

###Download STAR### Obtain STAR source from https://github.com/alexdobin/STAR

Add the following to your .bashrc file and source it: export PATH=/path/to/STAR/bin/:$PATH

###Generate Reference Genome