Skip to content

Instantly share code, notes, and snippets.

View onehr's full-sized avatar
hacking

hrw onehr

hacking
  • Earth
  • 16:54 (UTC +08:00)
View GitHub Profile
# unbind C-b
set -g prefix C-b
bind-key TAB last-window
bind-key C-b send-prefix
bind Enter copy-mode
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
diff --git a/src/parser.rs b/src/parser.rs
index 0900ea9..e31dc55 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -1,5 +1,542 @@
use crate::lexer;
+// TODO:
+// Trying to implement a better parser to support c11 full standard
+// assmue the the lexer can contains all keywords in the c11 standard,
@onehr
onehr / stdc++.h
Created November 27, 2017 11:45 — forked from velicast/stdc++.h
Linux GCC 4.8.0 /bits/stdc++.h header definition.
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
@onehr
onehr / min-char-rnn.py
Created November 14, 2017 03:13 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@onehr
onehr / python_resources.md
Last active August 29, 2015 14:22 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@onehr
onehr / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console