Skip to content

Instantly share code, notes, and snippets.

prompt="%(\!.%F{9}.%F{10})%n%f%F{46}@%f%(\!.%F{8}.%F{14})%m%f [%j running] %F{27}%~%f %(\!.%F{9}.%F{10})%(\!.#.\$)%f "
# Unescaped :
prompt="%(!.%F{9}.%F{10})%n%f%F{46}@%f%(!.%F{8}.%F{14})%m%f [%j running] %F{27}%~%f %(!.%F{9}.%F{10})%(!.#.\$)%f "
@minhducsun2002
minhducsun2002 / Leviathan-Password.txt
Last active October 15, 2018 15:26
OverTheWire password for Leviathan and Natas
rioGegei8m
ougahZi8Ta
Ahdiemoo1j
vuH0coox6m
Tith4cokei
UgaoFee4li
from urllib.request import urlopen,urlretrieve
import urllib
import sys
import json
key="ACCESS_KEY"
width=1920
height=1080
url="https://api.unsplash.com/photos/random?orientation=landscape&w="+str(width)+"&h="+str(height)+"&client_id="+key
response=""
try:
@minhducsun2002
minhducsun2002 / GNU C++.sublime-build
Last active July 23, 2018 08:44
Sublime Text build system for GNU/Linux
{
// Sublime Text build system for GNU/Linux
"cmd": ["g++ \"${file}\" -o \"${file_path}\/${file_base_name}\" && echo \"Target binary is at \"\"${file_path}\/${file_base_name}\""],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
// "selector": "source.c, source.c++, source.cpp",
"selector": "source.c",
"shell": true,
"variants":
@minhducsun2002
minhducsun2002 / shortener_backlog.mapping
Last active July 19, 2018 14:53
Shortened link directory for cipherallies.me
source = https://github.com/minhducsun2002/minhducsun2002.github.io
google = https://google.com.vn
shsgs = http://shsgs.simpleguy.tech
@minhducsun2002
minhducsun2002 / tasks.json
Last active June 5, 2019 14:27 — forked from dungwinux/tasks.json
VSCode C++ tasks script
{
"version": "2.0.0",
"tasks": [
{
"label": "Build with C++17",
"group": "build",
"command": "g++",
"args": [ "-std=c++17", "${workspaceFolder}/${relativeFile}", "-o", "${workspaceFolder}/${fileBasenameNoExtension}" ],
"promptOnClose": false,
"problemMatcher": {
@minhducsun2002
minhducsun2002 / environmentsetup_allheaders.cpp
Last active August 2, 2018 01:03
Precompiled list of headers and definitions
#include <cstdlib>
#include <bitset>
#include <functional>
#include <utility>
#include <ctime>
#include <chrono>
#include <cstddef>
#include <initializer_list>
#include <tuple>
#include <new>
@minhducsun2002
minhducsun2002 / lis.cpp
Last active May 5, 2018 00:45
LIS using Patience Sorting
#include <bits/stdc++.h>
using namespace std;
typedef long long int llint;
const long long int LLINT_MAX = LLONG_MAX;
const long long int LLINT_MIN = LLONG_MIN;
vector <vector <llint> > sort_to_piles (vector <llint> arr)
{
@dungwinux
dungwinux / deploy.bat
Created April 6, 2018 08:22
Competitive quick deploy
@echo off
set /p name="Archive Name: "
mkdir %name%
REM VVV Change cpp to file extension you want
copy *.cpp %name%
7z a %name%.zip %name%/
rmdir /S /Q %name%
All times are in GMT+7, Hanoi.
================================
Generated 20:22, March 24th 2018
================================
86067916 -- 12:32, March 25th 2018
45856040 -- 16:46, March 25th 2018
32356708 -- 11:57, March 30th 2018
32455175 -- 20:41, March 30th 2018
23532432 -- 19:43, March 31th 2018