This file contains hidden or 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
| package randstr | |
| import ( | |
| "math/rand" | |
| "time" | |
| ) | |
| const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" | |
| const ( | |
| letterIdxBits = 6 // 6 bits to represent a letter index |
This file contains hidden or 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 clone https://github.com/emacs-mirror/emacs | |
| cd emacs/ | |
| git checkout emacs-25.3 | |
| sudo apt install --no-install-recommends texinfo | |
| sudo apt install libgtk-3-dev libxpm-dev libjpeg8-dev libgif-dev libtiff5-dev libtinfo-dev librsvg2-dev libmagickwand-dev libacl1-dev libgnutls-dev | |
| # Note: if you have installed Anaconda python distribution, it will | |
| # affect how linker find libjpeg8 dynamic library files. To resolve | |
| # this, simply remove Anaconda directory from PATH variable. | |
| # ./autogen.sh | |
| # ./configure |
This file contains hidden or 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
| package main | |
| import ( | |
| "bytes" | |
| "sync" | |
| ) | |
| var strBufPool *sync.Pool = &sync.Pool{ | |
| New: func() interface{} { | |
| it := new(StrBuf) |
This file contains hidden or 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
| package main | |
| func main() { | |
| i = chan() | |
| o = chan() | |
| wg := wg.New(N) | |
| for i := range N { | |
| wg.Add(1) |
This file contains hidden or 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/sh | |
| set -e | |
| sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common | |
| sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev libperl-dev mercurial libncurses5-dev libcairo2-dev | |
| \curl -sSL https://get.rvm.io | bash -s stable | |
| rvm install ruby-1.9.3 |
This file contains hidden or 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
| $.extend $.inputmask.defaults, { | |
| placeholder: "*" | |
| , autoUnmask: false | |
| , clearMaskOnLostFocus: true | |
| , clearIncomplete: false | |
| } | |
| $.extend $.inputmask.defaults.aliases, { | |
| d_m_y_clearIncomplete: { | |
| mask: "d.m.y", |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| from . import color | |
| # For pervasive information on states of all elementary constructs. | |
| # Use 'Trace' for in-depth debugging to find problem parts of a function, | |
| # to check values of temporary variables, etc. | |
| TRACE = 0 | |
| # For detailed system behavior reports and diagnostic messages |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import os | |
| from . import color | |
| from . import log_level | |
| from . import exception | |
| class LoggerException(exception.Base): | |
| message = "logger error" |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import locale | |
| from sys import stderr, stdout | |
| from datetime import datetime, timedelta | |
| from types import GeneratorType | |
| from contextlib import contextmanager | |
| from .logger import Logger | |
| from . import color |
This file contains hidden or 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
| uint32_t buf_len = 0; | |
| unsigned char *m_output_buffer; | |
| FILE *f_debug = fopen("../tmp/nvenc_out.264", "ab"); | |
| fwrite(m_output_buffer, buf_len, 1, f_debug); | |
| fclose(f_debug); |