git remote -v
# origin https://github.com/NearHuscarl/dotfiles (fetch)
# origin https://github.com/NearHuscarl/dotfiles (push)
git remote set-url origin [email protected]:NearHuscarl/dotfiles.git
git remote -v
# origin [email protected]:NearHuscarl/dotfiles.git (fetch)
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
// https://gist.github.com/NearHuscarl/86ce74d95798635e14c8b848863b429f | |
extension ExtendedIterable<E> on Iterable<E> { | |
/// Like Iterable<T>.map but callback have index as second argument | |
Iterable<T> mapIndexed<T>(T Function(E e, int i) f) { | |
var i = 0; | |
return map((e) => f(e, i++)); | |
} | |
void forEachIndexed(void Function(E e, int i) f) { |
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
code --list-extensions | % { "code --install-extension $_" } | |
code --install-extension CoenraadS.bracket-pair-colorizer | |
code --install-extension Dart-Code.dart-code | |
code --install-extension Dart-Code.flutter | |
code --install-extension dbaeumer.vscode-eslint | |
code --install-extension donjayamanne.githistory | |
code --install-extension DotJoshJohnson.xml | |
code --install-extension eamodio.gitlens | |
code --install-extension Equinusocio.vsc-material-theme |
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
public static class Effect | |
{ | |
public static readonly string BLOOD = "BLD"; | |
// IGame.PlayEffect("CAM_S", Vector2 position, float strength, float milliseconds, bool UNDOCUMENTED) | |
// IGame.PlayEffect("CAM_S", Vector2.Zero, 1f, 500f, true) | |
public static readonly string CAMERA_SHAKER = "CAM_S"; | |
// IGame.PlayEffect("CFTXT", Vector2 Position, string Text) | |
public static readonly string CUSTOM_FLOAT_TEXT = "CFTXT"; | |
public static readonly string ELECTRIC = "Electric"; | |
public static readonly string EXPLOSION = "EXP"; |
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
# -*- coding: utf-8 -*- | |
""" | |
Cho vali chứa được trọng lượng tối đa là W. Có n đồ vật được đánh số từ 1 đến n, | |
đồ vật thứ i có khối lượng weight[i] và giá trị value[i], 1 <= i <= n. Tìm cách | |
xếp đồ vật vào vali sao cho tổng giá trị các đồ vật trong vali là lớn nhất | |
""" | |
weight = [3, 4, 5, 2, 1] | |
value = [4, 5, 6, 3, 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
; Japanese Emoijs | |
:::angry::(#`Д´) | |
:::awesome::°˖✧◝(⁰▿⁰)◜✧˖° | |
:::cry::(μ_μ) | |
:::fear::〣( ºΔº )〣 | |
:::dcare::┐( ̄ヘ ̄)┌ | |
:::confuse::( ̄ω ̄;) | |
:::surprise::Σ(O_O) | |
:::greet::(°▽°)/ | |
:::hug::(づ ̄ ³ ̄)づ |
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
#!/usr/bin/env bash | |
# Source: https://gist.github.com/Tadly/0741821d3694deaec1ee454a95c591fa | |
# | |
# Use rofi to pick emoji because that's what this | |
# century is about apparently... | |
# | |
# Requirements: | |
# rofi, xsel, xdotool, curl, xmllint | |
# | |
# Usage: |
$ cd /dirname/
$ git clone [email protected]:user_name/repository_name.git
$ git branch new_branch
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
black="$(tput setaf 0)" | |
red="$(tput setaf 1)" | |
green="$(tput setaf 2)" | |
yellow="$(tput setaf 3)" | |
blue="$(tput setaf 4)" | |
magenta="$(tput setaf 5)" | |
cyan="$(tput setaf 6)" | |
white="$(tput setaf 7)" | |
reset="$(tput sgr0)" |