Skip to content

Instantly share code, notes, and snippets.

View y56's full-sized avatar
🌏
(* ̄▽ ̄)/‧☆*"`'*-.,_,.-*'`"*-.,_☆

Eugene y56

🌏
(* ̄▽ ̄)/‧☆*"`'*-.,_,.-*'`"*-.,_☆
View GitHub Profile
@y56
y56 / LS_COLORS
Created July 21, 2020 13:41
LS_COLORS
rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35
@y56
y56 / Font settings not working for WSL apps that draw over the entire screen
Created July 21, 2020 03:08
Font settings not working for WSL apps that draw over the entire screen
https://github.com/microsoft/terminal/issues/177#issuecomment-464416055
Not sure if this bug has been fixed already, anyway, in my case, just changing the code page of command prompt works :
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage]
"ACP"="1252"
"MACCP"="10000"
"OEMCP"="437"
@y56
y56 / git stash clear
Created July 16, 2020 08:52
git stash clear -- How can I delete all of my Git stashes at once?
How can I delete all of my Git stashes at once?
https://stackoverflow.com/questions/11369375/how-can-i-delete-all-of-my-git-stashes-at-once
Stack Overflow
Products
Customers
Use cases
@y56
y56 / git stash apply
Created July 14, 2020 09:56
Git - opening and editing files from other branches
https://stackoverflow.com/questions/38016277/git-opening-and-editing-files-from-other-branches
There two ways you can do this:
Commit the changes in alt branch and then do git checkout master.
If you do not want to commit then do git stash in alt branch and then go to master by doing this: git checkout master. Later once you have done the testing in master, checkout to alt and do git stash apply(this would reapply the changes to alt branch).
Each time you do git stash it creates a list of changes, which can be checked by git stash list. Each item will have an index number to it starting from 0. So if you stash more than once you can reapply a particular stash like this: git stash apply @stash{<index_no>}.
@y56
y56 / Key mapping for apple mac magic wireless keyboard on Windows 10
Created July 11, 2020 16:19
Key mapping for apple mac magic wireless keyboard on Windows 10
https://github.com/uxsoft/AppleWirelessKeyboard/releases/
@y56
y56 / keyboard shortcut for mouse right click menu by keyboard
Created June 4, 2020 19:09
keyboard shortcut for mouse right click menu by keyboard
https://superuser.com/questions/195167/keyboard-shortcut-for-mouse-right-click
There isn't one for left-click, though spacebar and Enter are often usable.
Right-clicking is usually a request for a context-sensitive menu which is performed on the keyboard either by typing
≣ Menu key (https://en.wikipedia.org/wiki/Menu_key),
Shift+F10,
@y56
y56 / functools.lru_cache
Created April 30, 2020 06:04
functools.lru_cache
import functools
@functools.lru_cache(None)
def f(x):
print('f')
return 2
def g(x):
print('g')
return 2
@y56
y56 / How do I prevent Conda from activating the base environment by default
Created April 30, 2020 05:41
How do I prevent Conda from activating the base environment by default?
https://stackoverflow.com/questions/54429210/how-do-i-prevent-conda-from-activating-the-base-environment-by-default
==
I recently installed anaconda2 on my Mac. By default Conda is configured to activate the base environment when I open a fresh terminal session.
I want access to the Conda commands (i.e. I want the path to Conda added to my $PATH which Conda does when initialised so that's fine).
But I don't ordinarily program in python, and I don't want Conda to activate an environment by default.
@y56
y56 / How to hide hover tooltips on Spyder 4
Created April 30, 2020 05:40
How to hide hover tooltips on Spyder 4
https://stackoverflow.com/questions/59225879/how-to-hide-hover-tooltips-on-spyder-4
not sure where to ask:
is there a way to not have the help tooltip/popup/hover window opening in spyder?
since updating to 4.0 the window does not close when you change between windows:
https://stackoverflow.com/questions/59225879/how-to-hide-hover-tooltips-on-spyder-4
@y56
y56 / spyder4 on conda anaconda miniconda along with apt spyder3
Created April 30, 2020 05:21
spyder4 on conda anaconda miniconda along with apt spyder3
apt has its spyder3 (3.2.6)
let's install miniconda
download here https://docs.conda.io/en/latest/miniconda.html
run
$ sh Miniconda3-latest-Linux-x86_64.sh
use miniconda to install spyder4
$ conda install spyder
so I can have them both