#define iterate(i, n) for (i = 0; i < n; ++i)
#define print_int_arr(arr, i, n) for (i = 0; i < n; ++i) printf("%d, ", arr[i]);
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
| set mouse=a | |
| set expandtab | |
| set shiftwidth=2 | |
| set softtabstop=2 | |
| set tw=80 | |
| syntax on | |
| filetype plugin on |
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
| t = [1, 12, 123, 1234, 12345, | |
| 123456, 1234567, 12345678, | |
| 123456789, 1234567890, | |
| 12345678901, 123456789012]; | |
| function convert(x) { | |
| return x.toString().substr() | |
| .replace(/\B(?=\d{3}$)/g, ",") | |
| .replace(/\B(?=(\d{2})+(?!\d),)/g, ",") | |
| }; |
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
| require 'action_view' | |
| NOTICE_ATTRIBS = 5 | |
| TOP_NOTICES = 5 | |
| # https://apidock.com/rails/v4.2.1/ActionView/Helpers/TextHelper/split_paragraphs | |
| def split_paragraphs(text) | |
| return [] if text.blank? | |
| text.to_str.gsub(/\r\n?/, "\n").split(/\n\n+/).map! do |t| |
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
| bind -T root F12 \ | |
| set prefix None \;\ | |
| set key-table off \;\ | |
| set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\ | |
| set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\ | |
| set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\ | |
| if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ | |
| refresh-client -S \;\ | |
| bind -T off F12 \ |
OlderNewer