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
#include <vector> | |
#include <unordered_map> | |
#include <map> | |
#include <cassert> | |
#include <iostream> | |
using namespace std; | |
class Solver { | |
public: |
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
#include <vector> | |
#include <cassert> | |
using namespace std; | |
class Solver { | |
public: | |
Solver() = default; | |
int solve(vector<int>& pkgs) { | |
if (pkgs.empty()) return 0; |
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 | |
set -e | |
VERSION="3.0a" | |
wait_time=10 | |
my_cfg="https://gist.githubusercontent.com/LplusKira/e6c44f54b79b04b5dba9198fec5a9acd/raw/f1fab270c7abcb91f19e07d3775639f5763f23d1/.tmux.conf" | |
echo "Enter your password: " | |
read -s password | |
echo "This will remove current tmux and replace it with ver: ${VERSION}" |
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 | |
## - Ref: https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/ | |
# Configuring ... | |
printf "Type current usr's password: " | |
read -s password | |
echo "" | |
printf "Type major version (e.g. 12): " | |
read ver | |
echo "" |
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 | |
git config --global user.name "LplusKira" | |
git config --global user.email [email protected] | |
git config --global core.editor vim |
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 | |
# - (Ubuntu 16.04 and later only) | |
set -e | |
# Checking dependencies ... | |
## - Assert prerequisites git, curl, python3, my .vimrc | |
apt-get update -y | |
apt-get install -y git python3 curl cmake | |
#git --version | |
#python3 --version |
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 | |
## - Ref: https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart | |
echo "ONLY use this script on ubuntu 16.04 -- \"lay down butcher's knife, become a Buddha on the spot\"" | |
# Adding ... | |
printf "Type to-be-created usr name: " | |
read username | |
echo "" | |
sudo adduser ${username} |
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
### | |
# Tmux config for 3.0a | |
### | |
# set the prefix of tmux from ctl-b to ctl-a | |
set-option -g prefix C-a | |
# use bash as tmux' default shell |
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
### | |
# Tmux config for 3.0a | |
### | |
# set the prefix of tmux from ctl-a to ctl-b | |
set-option -g prefix C-a | |
# use zsh as tmux' default shell |
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
scriptencoding utf-8 | |
" | |
" ██╗ ██╗ ██╗ ███╗ ███╗ ██████╗ ██████╗ | |
" ██║ ██║ ██║ ████╗ ████║ ██╔══██╗ ██╔════╝ | |
" ██║ ██║ ██║ ██╔████╔██║ ██████╔╝ ██║ | |
" ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║ ██╔══██╗ ██║ | |
" ██╗╚████╔╝ ██║ ██║ ╚═╝ ██║ ██║ ██║ ╚██████╗ | |
" ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ | |
" |
NewerOlder