Merge branch 'master' of github.com:nichus/sundry
This commit is contained in:
commit
e11fe722cb
@ -21,11 +21,12 @@ limitations under the License.
|
|||||||
|
|
||||||
:root {
|
:root {
|
||||||
/* Modify these to change your theme colors: */
|
/* Modify these to change your theme colors: */
|
||||||
--primary: #09F;
|
|
||||||
--text: #c3c4c5;
|
--text: #c3c4c5;
|
||||||
--background: #23272a;
|
--background: #23272a;
|
||||||
--background-elevated: #2c2f33;
|
--background-elevated: #2c2f33;
|
||||||
--background-content: #36393e;
|
--background-content: #36393e;
|
||||||
|
--attention: #d98719;
|
||||||
|
--primary: var(--attention);
|
||||||
|
|
||||||
/* These should be less important: */
|
/* These should be less important: */
|
||||||
--background-hover: rgba(255, 255, 255, 0.1);
|
--background-hover: rgba(255, 255, 255, 0.1);
|
||||||
@ -36,7 +37,7 @@ limitations under the License.
|
|||||||
--border-bright: #aaa;
|
--border-bright: #aaa;
|
||||||
|
|
||||||
--text-bright: #FFF;
|
--text-bright: #FFF;
|
||||||
--text-special: var(--primary);
|
--text-special: #08C;
|
||||||
|
|
||||||
--scrollbar-background: #000;
|
--scrollbar-background: #000;
|
||||||
--scrollbar-border: var(--primary);
|
--scrollbar-border: var(--primary);
|
||||||
@ -295,6 +296,10 @@ ts-message {
|
|||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.msg_inline_attachment_column.column_border {
|
||||||
|
background-color: var(--border-dim);
|
||||||
|
}
|
||||||
|
|
||||||
ts-message:hover {
|
ts-message:hover {
|
||||||
background: var(--background-hover) !important;
|
background: var(--background-hover) !important;
|
||||||
}
|
}
|
||||||
@ -318,7 +323,6 @@ ts-message:hover {
|
|||||||
.rxn,
|
.rxn,
|
||||||
#col_channels,
|
#col_channels,
|
||||||
#col_channels_footer,
|
#col_channels_footer,
|
||||||
pre,
|
|
||||||
ts-message .action_hover_container .btn_msg_action,
|
ts-message .action_hover_container .btn_msg_action,
|
||||||
.file_container,
|
.file_container,
|
||||||
.file_container .CodeMirror .CodeMirror-code>div:before, .file_container .CodeMirror .sssh-line:before, .file_container .sssh-code .CodeMirror-code>div:before, .file_container .sssh-code .sssh-line:before,
|
.file_container .CodeMirror .CodeMirror-code>div:before, .file_container .CodeMirror .sssh-line:before, .file_container .sssh-code .CodeMirror-code>div:before, .file_container .sssh-code .sssh-line:before,
|
||||||
@ -329,9 +333,13 @@ ts-message .action_hover_container .btn_msg_action,
|
|||||||
.menu,
|
.menu,
|
||||||
.menu #menu_items_scroller,
|
.menu #menu_items_scroller,
|
||||||
.btn, .btn_outline {
|
.btn, .btn_outline {
|
||||||
background: var(--background-elevated) !important;
|
background: var(--background-content) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* orien attachment */
|
||||||
|
.attachment_group .media_caret {
|
||||||
|
color: var(--border-dim);
|
||||||
|
}
|
||||||
|
|
||||||
#flex_contents .heading,
|
#flex_contents .heading,
|
||||||
#flex_contents .heading a,
|
#flex_contents .heading a,
|
||||||
@ -344,7 +352,7 @@ ts-message .action_hover_container .btn_msg_action,
|
|||||||
|
|
||||||
pre,
|
pre,
|
||||||
ts-message .action_hover_container .btn_msg_action,
|
ts-message .action_hover_container .btn_msg_action,
|
||||||
.file_container .CodeMirror .CodeMirror-code>div pre, .file_container .CodeMirror .sssh-line pre, .file_container .sssh-code .CodeMirror-code>div pre, .file_container .sssh-code .sssh-line pre,
|
.file_container .CodeMirror .CodeMirror-code>div pre, .file_container .CodeMirror .CodeMirror-code>div, .file_container .CodeMirror .sssh-line pre, .file_container .sssh-code .CodeMirror-code>div pre, .file_container .sssh-code .CodeMirror-code>div, .file_container .sssh-code .sssh-line pre,
|
||||||
.search_message_result .search_message_result_meta a,
|
.search_message_result .search_message_result_meta a,
|
||||||
.search_message_result .search_message_result_meta .date_links a,
|
.search_message_result .search_message_result_meta .date_links a,
|
||||||
.flexpane_redesign #flex_contents .heading_text,
|
.flexpane_redesign #flex_contents .heading_text,
|
||||||
@ -354,6 +362,7 @@ ts-message .action_hover_container .btn_msg_action,
|
|||||||
.btn, .btn_outline, .menu {
|
.btn, .btn_outline, .menu {
|
||||||
color: var(--text) !important;
|
color: var(--text) !important;
|
||||||
border-color: var(--border-dim) !important;
|
border-color: var(--border-dim) !important;
|
||||||
|
background-color: var(--background);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:hover:after {
|
.btn:hover:after {
|
||||||
@ -410,12 +419,15 @@ ts-message .action_hover_container .btn_msg_action,
|
|||||||
|
|
||||||
.feature_name_tagging_client ts-message .mention, ts-message .mention,
|
.feature_name_tagging_client ts-message .mention, ts-message .mention,
|
||||||
span.match {
|
span.match {
|
||||||
border: 1px solid var(--border-bright) !important;
|
border: 1px solid var(--attention) !important;
|
||||||
background-color: var(--background-elevated) !important;
|
background-color: var(--background-elevated) !important;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
/*
|
||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
orien
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.mention > .mention {
|
.mention > .mention {
|
||||||
@ -491,10 +503,25 @@ ts-message a.timestamp{
|
|||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* orien divider */
|
||||||
|
#msgs_div .unread_divider hr {
|
||||||
|
border-color: var(--attention); /* default is #f26130 */
|
||||||
|
}
|
||||||
|
#msgs_div .unread_divider .divider_label
|
||||||
|
{
|
||||||
|
background: var(--background);
|
||||||
|
padding: 4px 4px;
|
||||||
|
border-radius: 0px;
|
||||||
|
border: 1px solid var(--attention);
|
||||||
|
margin: -1px 11px -13px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
#msgs_div .unread_divider.no_unreads .divider_label
|
#msgs_div .unread_divider.no_unreads .divider_label
|
||||||
{
|
{
|
||||||
background: #000 !important;
|
background: var(--background-elevated);
|
||||||
color: #aaa !important;
|
color: #aaa !important;
|
||||||
|
border: none;
|
||||||
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#msgs_div .unread_divider.no_unreads hr{
|
#msgs_div .unread_divider.no_unreads hr{
|
||||||
@ -743,6 +770,20 @@ ts-message .reply_bar:hover {
|
|||||||
border-color: var(--border-dim);
|
border-color: var(--border-dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* orien : HERE */
|
||||||
|
#messages_unread_status {
|
||||||
|
border: 1px solid var(--attention);
|
||||||
|
background-color: var(--background);
|
||||||
|
border-radius: 0px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
#messages_unread_status:hover, #messages_unread_status:hover .clear_unread_messages {
|
||||||
|
background-color: var(--background-elevated);
|
||||||
|
}
|
||||||
|
#messages_unread_status .clear_unread_messages {
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
|
||||||
#archives_return, .messages_banner {
|
#archives_return, .messages_banner {
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
background-color: var(--background-elevated);
|
background-color: var(--background-elevated);
|
||||||
|
5
vimrc
5
vimrc
@ -14,6 +14,7 @@
|
|||||||
" * https://github.com/scrooloose/syntastic
|
" * https://github.com/scrooloose/syntastic
|
||||||
" * https://github.com/hashivim/vim-terraform.git
|
" * https://github.com/hashivim/vim-terraform.git
|
||||||
" * https://github.com/tangledhelix/vim-kickstart.git
|
" * https://github.com/tangledhelix/vim-kickstart.git
|
||||||
|
" * git@github.com:yorokobi/vim-splunk.git
|
||||||
"
|
"
|
||||||
" Pathogen colorschemes used: (vimcolors.com for more)
|
" Pathogen colorschemes used: (vimcolors.com for more)
|
||||||
" * https://github.com/Marfisc/vorange.git
|
" * https://github.com/Marfisc/vorange.git
|
||||||
@ -46,8 +47,8 @@ set comments-=s1:/*,mb:*,ex:*/
|
|||||||
set comments+=s:/*,mb:\ *,ex:\ */
|
set comments+=s:/*,mb:\ *,ex:\ */
|
||||||
set comments+=fb:*
|
set comments+=fb:*
|
||||||
|
|
||||||
" Highlight the focused line
|
" If uncommented highlight the focused line
|
||||||
set cursorline
|
"set cursorline
|
||||||
|
|
||||||
"set background=dark
|
"set background=dark
|
||||||
"let g:badwolf_darkgutter=1
|
"let g:badwolf_darkgutter=1
|
||||||
|
1241
wod/Cargo.lock
generated
Normal file
1241
wod/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
9
wod/Cargo.toml
Normal file
9
wod/Cargo.toml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[package]
|
||||||
|
name = "wod"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Orien Vandenbergh <orien.vandenbergh@defpoint.com>"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
reqwest = "0.8.2"
|
||||||
|
scraper = "0.4.0"
|
||||||
|
select = "0.4.2"
|
41
wod/src/main.rs
Normal file
41
wod/src/main.rs
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
extern crate reqwest;
|
||||||
|
extern crate scraper;
|
||||||
|
extern crate select;
|
||||||
|
|
||||||
|
use select::document::Document;
|
||||||
|
use select::predicate::{Class,Name,Predicate};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
if is_cached() {
|
||||||
|
} else {
|
||||||
|
wod("http://www.merriam-webster.com/word-of-the-day");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn is_cached() -> bool {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
fn wod(url: &str) {
|
||||||
|
let yellow = "\x1b[1;33m";
|
||||||
|
let purple = "\x1b[0;35m";
|
||||||
|
let nc = "\x1b[0m";
|
||||||
|
|
||||||
|
let resp = reqwest::get(url).unwrap();
|
||||||
|
assert!(resp.status().is_success());
|
||||||
|
|
||||||
|
let document = Document::from_read(resp).unwrap();
|
||||||
|
let node = document.find(Class("word-header")).next().unwrap();
|
||||||
|
let word = node.find(Name("h1")).next().unwrap().text();
|
||||||
|
|
||||||
|
let node = document.find(Class("word-attributes")).next().unwrap();
|
||||||
|
let attr = node.find(Class("main-attr")).next().unwrap().text();
|
||||||
|
let syllables = node.find(Class("word-syllables")).next().unwrap().text();
|
||||||
|
|
||||||
|
println!("Word of the Day: {}{} : {} ({}){}", yellow, word, attr, syllables, nc);
|
||||||
|
for definition in document.find(Class("wod-definition-container").child(Name("p"))) {
|
||||||
|
let children: Vec<String> = definition.children().map(|n| n.text()).collect();
|
||||||
|
let texts = children.join("");
|
||||||
|
println!(" definition: {}{}{}", purple, texts, nc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user