Signatures of functions, methods and class constructors can be given like they would be written in Python.
git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.
- Atom is transitioning to an entirely new way of defining grammars using
tree-sitter
. This will be enabled by default quite soon now. It is theoretically faster and more powerful than regex based grammars (the one described in this guide), but requires a steeper learning curve. My understanding is that regex based grammars will still be supported however (at least until version 2), so this guide can still be useful. To enable it yourself, go to Settings -> Core and checkUse Tree Sitter Parsers
Links for tree-sitter
help:
tree-sitter
: the main repotree-sitter-cli
: converts a JavaScript grammar to the required C/C++ filesnode-tree-sitter
: module to use Tree-sitter parsers in NodeJS- [My guide on starting a Tree-sitter grammar
Disclaimer: I wrote the packages language-latex2e
, autocomplete-latex
, latex-wordcount
, and hyperclick-latex
. I still try to provide a list of all useful packages though, so let me know if I have missed one.
This is a general guide for how to get started with LaTeX in Atom.
NOTE: This guide assumes you already have LaTeX installed on your computer. If you do not, I recommend TeX Live.
""" | |
Lyle Scott, III // lyle@ls3.io | |
Multiple ways to rotate a 2D point around the origin / a point. | |
Timer benchmark results @ https://gist.github.com/LyleScott/d17e9d314fbe6fc29767d8c5c029c362 | |
""" | |
from __future__ import print_function | |
import math |
from PIL import Image, ImageOps | |
import cv2 | |
desired_size = 368 | |
im_pth = "/home/jdhao/test.jpg" | |
# im = Image.open(im_pth) | |
# old_size = im.size # old_size[0] is in (width, height) format | |
# ratio = float(desired_size)/max(old_size) |
# import library --------------------------------------------------------------- | |
import pygame.midi | |
import time | |
# define all the constant values ----------------------------------------------- | |
device = 0 # device number in win10 laptop | |
instrument = 9 # http://www.ccarh.org/courses/253/handout/gminstruments/ | |
note_Do = 48 # http://www.electronics.dit.ie/staff/tscarff/Music_technology/midi/midi_note_numbers_for_octaves.htm | |
note_Re = 50 | |
note_Me = 52 |
If you hate git submodule
, then you may want to give git subtree
a try.
When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add
command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.
When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.
Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:
# -> For a Blender 2.8+ version, go to https://gist.github.com/p2or/2947b1aa89141caae182526a8fc2bc5a | |
# https://blender.stackexchange.com/q/57306/3710, https://blender.stackexchange.com/q/79779/3710 | |
# ##### BEGIN GPL LICENSE BLOCK ##### | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# |