- Homebrew
First, install JAVA. Note that Android SDK is not yet supported JAVA 10, so install JAVA 8:
interface ObjectWithTimestamp { | |
timestamp: number; | |
} | |
function findClosestTimestampPair( | |
arr1: ObjectWithTimestamp[], | |
arr2: ObjectWithTimestamp[] | |
): [ObjectWithTimestamp, ObjectWithTimestamp][] | [] { | |
arr1.sort((a, b) => a.timestamp - b.timestamp); | |
arr2.sort((a, b) => a.timestamp - b.timestamp); |
Some .png
images used in pygame may get the warning read as "libpng warning: iCCP: known incorrect sRGB profile". To solve this I have searched and found the solution by using ImageMagick. After installing, single file can be fixed by calling convert <in_img> -strip <out_img>
, but to make it fixes every wanted images in path we'll need to modify just a little bit.
Create .bat
file contains the following code and place this .bat
in the folder that want to be fixed and run to finish it out.
@echo off
ping -n 2 127.0.0.1 > nul
echo this batch will convert ".png" using -strip option from ImageMagick.
Have a good time with bash for a long while, it's time to try another tempting shell - Zsh. So, this Gist is nothing but my collection for the environment that I've searched and applied to my system. There is also this kind of Gist in a version of bash.
There are several shells out there but this is the one that is close to the bash with some useful and attractive features especially - yes, theme. Here are some good articles about how and why to choose Zsh over bash, enjoy trying!
// 1 -> 1 | |
// 2 -> 11 2 | |
// 3 -> 111 12 21 | |
// 4 -> 1111 112 121 211 22 | |
// 5 -> 11111 1112 1121 1211 122 2111 212 221 | |
// 6 -> 111111 11112 11121 11211 12111 1122 1212 1221 21111 2112 2121 2211 222 | |
const getAllScenarios = (current, collection) => { | |
if (!collection.has(current)) { | |
collection.set(current, ""); |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.0</real> | |
<key>Green Component</key> | |
<real>0.0</real> |
git commit --amend
The command amend
changes the latest commit by replacing with the new one. Suppose you have changes in working directory, by running git commit --amend
the new changes will be committed as replacement of the old latest commit. If there is no new changes, this command will let you change commit comment of the latest commit and save as new commit replacing old latest commit.
# undo commit
git reset --soft HEAD~1
# undo add
# Configuration for Alacritty, the GPU enhanced terminal emulator. | |
# Import additional configuration files | |
# | |
# Imports are loaded in order, skipping all missing files, with the importing | |
# file being loaded last. If a field is already present in a previous import, it | |
# will be replaced. | |
# | |
# All imports must either be absolute paths starting with `/`, or paths relative | |
# to the user's home directory starting with `~/`. |