How to setup DigitalOcean's Droplet with Ubuntu 16.04 + UFW + NGINX + SSL + F2B
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
[ | |
{"name":"foo","size":3938,"imports":["bar"]}, | |
{"name":"bar","size":3938,"imports":[]} | |
] |
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
local user='%B%F{008}%n%f%b' | |
local machine='%B%F{008}%m%f%b' | |
local current_dir='%B%F{008}%~%f%b' | |
local git_info='%B$(git_prompt_info)%b' | |
PROMPT="${current_dir}${git_info} | |
$ " | |
ZSH_THEME_GIT_PROMPT_PREFIX="@%F{008}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%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
sudo add-apt-repository ppa:openrazer/stable | |
sudo apt update | |
sudo apt install openrazer-meta | |
sudo modprobe razerkbd | |
xinput set-prop "AT Raw Set 2 keyboard" "Device Enabled" 0 | |
cd /etc/X11/ | |
sudo mkdir xorg.conf.d | |
cd xorg.conf.d/ | |
sudo touch 20-razer.conf | |
sudo nano 20-razer.conf |
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
kana_dict = { | |
'あ': '安', | |
'ア': '阿', | |
'い': '以', | |
'イ': '伊', | |
'う': '宇', | |
'ウ': '宇', | |
'え': '衣', | |
'エ': '江', | |
'お': '於', |
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
local date='%F{008}%D{%Y.%m.%d}%f' | |
local time='%F{008}%*%f' | |
local timezone='%F{008}%D{%Z}%f' | |
local user='%B%F{129}%n%f%b' | |
local machine='%B%F{045}%m%f%b' | |
local current_dir='%B%F{147}%~%f%b' | |
local git_info='%B$(git_prompt_info)%b' | |
PROMPT="${user}@${machine} in ${current_dir} ${git_info} | |
%F{015}$%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
#!/bin/bash | |
sudo apt-get install curl zsh git | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
cd ~/.oh-my-zsh/custom/plugins && \ | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting && \ | |
curl -s https://gist.githubusercontent.com/wizo06/3dce572a8ba5ff7ddbf120829f541b7c/raw/d9ebbd0a3935264bf9cc2777a62aa887bf57d9a9/wizo-min.zsh-theme > ~/.oh-my-zsh/custom/themes/wizo-min.zsh-theme && \ | |
sed 's/^ZSH_THEME="robbyrussell"/ZSH_THEME="wizo-min"/' ~/.zshrc > ~/.zshrc_new && mv ~/.zshrc_new ~/.zshrc && \ | |
sed 's/^plugins=(git)/plugins=(git zsh-syntax-highlighting)/' ~/.zshrc > ~/.zshrc_new && mv ~/.zshrc_new ~/.zshrc && \ | |
source ~/.zshrc |
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
git config --global user.email "[email protected]" | |
git rebase -i | |
git commit --amend --reset-author | |
git rebase --continue | |
git push |
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
// Warning: maximum value for a variable of type int: 2,147,483,647 | |
#include <stdio.h> | |
int main(int argc, char *argv[]){ | |
if(argc == 2){ | |
int x = atoi(argv[1]); int n = 0; printf("%i %i\n",n,x); | |
if(x < 1){ | |
exit(1); | |
} | |
else{ | |
while(x != 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
// Warning: maximum value for a variable of type Number (no bitwise or shift operators allowed): 9,007,199,254,740,991 | |
let x = parseInt(process.argv[2]); | |
if(isNaN(x)) process.exit(1); | |
else{ | |
if(x < 1){ | |
process.exit(1); | |
} | |
else{ | |
let n = 0; console.log(`${n} ${x}`); | |
while (x !== 1){ |
NewerOlder