- Use the VS Code editor
- Install the LaTeX Workshop Editor from VS Code [Marketplace][1]
- Install the listed requirements
- Install the listed Spell checker
- Install VIM plugin
- Auto-build LaTeX pdf on save
- View pdf in VS Code tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RUN ALL THIS IN AN EMPTY DIR! | |
# Run in parallel | |
MAKEFLAGS += -j4 | |
# Simulation variables. | |
MSG = "Hello" | |
PARAMS := 100 1000 10000 | |
#PARAMS := $(shell seq 1 10) # or something like this for params = 1, 2, ..., 10 | |
SIMS := $(addprefix sim, $(PARAMS)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple Branching in Git / Github | |
# Reference: https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches | |
# Before creating a new branch, pull the changes from upstream. | |
# Your master needs to be up to date. | |
# Create new branch | |
git checkout -b myNewBranch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout [revision] . | |
# where [revision] is the commit hash (for example: 12345678901234567890123456789012345678ab). | |
# Don't forget the . at the end, very important. | |
# See: https://stackoverflow.com/questions/2007662/rollback-to-an-old-git-commit-in-a-public-repo | |
# Other useful commands | |
# Show which files were changed | |
git log --raw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to squash several commits into one big commit | |
See this also: https://www.internalpointers.com/post/squash-commits-into-one-git | |
1. Inspect the previous commits to see where you want to place the last commit | |
``` | |
git log --oneline | |
``` | |
2. Rebase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go to master branch (if needed) | |
git checkout master | |
# Look around | |
git remote -v | |
# Add upstream repo of the fork (if needed) | |
git remote add upstream <ssh-or-https-url-to-original-repo> | |
# Look around again |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Say you are working on a branch called `my-branch` | |
# and you wish to now merge it into `master`, and | |
# squash all commits from `my-branch` into one commit. | |
# You can do the following: | |
git checkout master | |
git merge --squash my-branch | |
git commit | |
# You will then be placed in an editor with all your previous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
np.random.seed(6) | |
n = 5 | |
a = 3 | |
lw = 10 | |
stick_length = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing TMUX without root permissions on LINUX machines is now as easy as this: | |
# Get the app image from tmux3 git repo. | |
wget https://github.com/tmux/tmux/releases/download/3.0a/tmux-3.0a-x86_64.AppImage | |
# Grant execute permissions. | |
chmod +x tmux-3.0a-x86_64.AppImage | |
# Move to ~/bin | |
mv tmux-3.0a-x86_64.AppImage ~/bin |
OlderNewer