This file contains 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
use crate::search::search_service::{SearchService, SearchErr, SearchResponse}; | |
use dioxus::{prelude::*}; | |
use log::debug; | |
// Render this in another page. | |
// | |
// I think of this as a "default layout" component, since you can still use InitFormAndDisplay to do you own layout. | |
pub fn DefaultComponent(cx: Scope) -> Element { | |
let (form, display) = InitFormAndDisplay(cx); |
This file contains 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
// My component which I render. | |
pub fn Component(cx: Scope) -> Element { | |
let (form, display) = InitFormAndDisplay(cx); | |
cx.render(rsx!{ | |
form | |
div { hr {} } | |
display | |
}) | |
} |
This file contains 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
# ... | |
# Create a central repo that knows about the dependencies needed from | |
# requirements_lock.txt. | |
pip_parse( | |
name = "pip_deps", | |
python_interpreter_target = interpreter, | |
requirements_lock = "//path/to:requirements_lock.txt", | |
) |
This file contains 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
RUST_BACKTRACE=1 cargo run --example gzip | |
Compiling reqwest v0.1.0 (file:///Users/jasonschein/Code/rust/reqwest) | |
warning: variable does not need to be mutable, #[warn(unused_mut)] on by default | |
--> examples/gzip.rs:12:9 | |
| | |
12 | let mut client = reqwest::Client::new().unwrap(); | |
| ^^^^^^^^^^ | |
warning: variable does not need to be mutable, #[warn(unused_mut)] on by default | |
--> examples/gzip.rs:14:9 |
This file contains 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
/* ~/.config/gtk-3.0/gtk.css */ | |
TerminalWindow .notebook tab:active { | |
background-color: #F6BBA6; | |
} |
This file contains 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
extern crate piston_window; | |
extern crate graphics; | |
extern crate piston; | |
use piston_window::*; | |
fn main() { | |
let opengl = OpenGL::V3_2; | |
let (width, height) = (800, 800); |
This file contains 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 | |
[[ -e ~/.dotfiles ]] || git clone git@github.com:sonots/.dotfiles.git ~/.dotfiles | |
pushd ~/.dotfiles | |
git submodule init | |
git submodule update | |
for i in `ls -a` | |
do | |
[ $i = "." ] && continue |
This file contains 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
export PATH="$(brew --prefix php55)/bin:$PATH" | |
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
function color_my_prompt { | |
local __default_color="\[\033[37m\]" | |
local __text_color="\[\033[0;37m\]" |
This file contains 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
mkdir ~/.vim/ | |
mkdir ~/.vim/swap/ | |
mkdir ~/.vim/backup | |
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim |
This file contains 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
function color_my_prompt { | |
local __default_color="\[\033[37m\]" | |
local __text_color="\[\033[0;37m\]" | |
local __user_and_host="\[\033[0;32m\]\u @ \h$__default_color" | |
local __cur_location="\[\033[0;36m\]\w$__default_color" | |
local __git_branch_color="\[\033[1;31m\]" | |
git --version 2>&1 >/dev/null # improvement by tripleee | |
GIT_IS_AVAILABLE=$? | |
if [ $GIT_IS_AVAILABLE -eq 0 ]; then | |
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\\\\\1\/`' |