Skip to content

Instantly share code, notes, and snippets.

View Daniel-Wang's full-sized avatar

Daniel Daniel-Wang

View GitHub Profile
@Daniel-Wang
Daniel-Wang / gist:3b84b416b097b378f23f222bfaa4ef97
Created August 22, 2017 00:22
Verifying that "danielwang.id" is my Blockstack ID. https://onename.com/danielwang
Verifying that "danielwang.id" is my Blockstack ID. https://onename.com/danielwang
0x83CB00EBf338036fb3De3a6971Fdd894381cAAA9
Verifying that "danielwang.id" is my Blockstack ID. https://onename.com/danielwang
@Daniel-Wang
Daniel-Wang / gist:125e788149b7161cbf8dfbf3b76173f9
Created March 24, 2018 04:42
Github verification for Blockstack
Verifying my Blockstack ID is secured with the address 1FZPsTSx1N4CxLLk6vPKF8p4VumMyk4E2D https://explorer.blockstack.org/address/1FZPsTSx1N4CxLLk6vPKF8p4VumMyk4E2D
@Daniel-Wang
Daniel-Wang / Application.h
Last active April 23, 2018 18:02
Application header file for Vm project
// Includes
namespace vm {
enum MODE {
COMMAND,
INSERT,
REPLACE
};
class Application {
@Daniel-Wang
Daniel-Wang / View.h
Last active April 21, 2018 08:27
View header file for Vm
// Includes
namespace vm {
class View {
public:
View(int height, int width, int startX, int startY);
~View();
void printBufferContent();
void setHighlighter(std::unique_ptr<Highlighter> highlighter);
@Daniel-Wang
Daniel-Wang / Controller.h
Last active April 23, 2018 18:01
Controller header file for Vm
// Includes here
class Controller {
public:
explicit Controller(Application& app);
void listenForInputs();
private:
void listenInsertMode();
@Daniel-Wang
Daniel-Wang / undo.cc
Created April 15, 2018 07:46
Undo Command
if (!_app.commandStack().empty() && _app.commandStack().top()->canUndo()) {
_app.commandStack().top()->undo();
_app.commandStack().pop();
}
@Daniel-Wang
Daniel-Wang / Buffer.h
Created April 23, 2018 17:58
Buffer header file for vm
class Buffer {
public:
explicit Buffer(int maxLines);
std::string readFile(const std::string& fileName);
void replaceChar (char c, int x, int y);
void insertChar (char c, int x, int y);
void insertString (const std::string& str, int x, int y);
void insertNewLine(int x, int y);
void deleteChar (int x, int y);
Verifying my Blockstack ID is secured with the address 1GcD6y28FsUJK5XkXvL7Pd1TnSQ5cPK4X5 https://explorer.blockstack.org/address/1GcD6y28FsUJK5XkXvL7Pd1TnSQ5cPK4X5