Skip to content

Instantly share code, notes, and snippets.

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@huytd
huytd / wordle.md
Last active May 2, 2024 12:13
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@liamcain
liamcain / obsidian-pagebreaks.css
Created November 8, 2020 01:04
Obsidian Pagebreaks
/**
Create pagebreaks in exported Obsidian PDFs.
Example:
# Heading 1
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type
@PoisonAlien
PoisonAlien / rna_seq_variant_pipeline.sh
Created August 7, 2015 09:35
RNA seq Variant calling pipeline according to gatk best practices
#!/bin/bash
#
# AUTHOR: Anand M.
# RNA-Seq variant calling pieline accoring to GATK Best practices.
# https://www.broadinstitute.org/gatk/guide/article?id=3891
#
# Call with following arguments
# bash rna_seq_variant_pipeline.sh <Input_Reads1.fq.gz> <Input_Reads2.fq.gz> <output_basename>
#
# Assumes STAR aligner is under path
@dhh
dhh / linux-setup.sh
Last active May 2, 2024 12:07
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@kylerbrown
kylerbrown / complex_radar_plot.py
Last active May 2, 2024 12:07
Code for a complex radar plot
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns # improves plot aesthetics
def _invert(x, limits):
"""inverts a value x on a scale from
limits[0] to limits[1]"""
return limits[1] - (x - limits[0])
def _scale_data(data, ranges):
<Name>IDM Full ToolKit</Name>
<Version>4.7</Version>
<Download>https://onedrive.live.com/download?cid=860C6C270D0296DF&resid=860C6C270D0296DF%21175&authkey=APaTYii-uJSRpD0</Download>
link khác:
https://uploading.vn/vtyktzy6ukao
https://veryfiles.com/apcik7jdp3wz
[IDM Toolbar]
<URL>https://drive.google.com/uc?export=download&id=0B3sqdC3gTItxWDNubEFCZEI0RkE</URL>
@riverar
riverar / gist:4052f4a792ad2b784f8f
Created May 28, 2014 20:33
Diff of TrueCrypt 7.1a and "TrueCrypt 7.2" sources
--- Boot/Windows/BootMain.cpp Mon Jan 19 14:26:12 1970
+++ Boot/Windows/BootMain.cpp Mon Jan 19 14:26:12 1970
@@ -75,7 +75,9 @@
#endif // TC_WINDOWS_BOOT_RESCUE_DISK_MODE
- PrintEndl (3);
+ PrintEndl (2);
+ Print ("WARNING: Using TrueCrypt is not secure");
+ PrintEndl (2);