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 std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |
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
Process for setting up github pages with namecheap domain. | |
1. Go to namecheap.com, select and buy domain name. | |
2. Login to namecheap, go to username drop down and select dashboard. | |
3. Go to DomainList | |
4. Click manage button | |
5. Click Advanced DNS tab | |
6. Click add record and add three records: | |
Type: A Record | Host: @ | Value: 192.30.252.153 | TTL: Automatic |
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
############## | |
# pretty prompt and font colors | |
############## | |
# alter the default colors to make them a bit prettier | |
echo -en "\e]P0000000" #black | |
echo -en "\e]P1D75F5F" #darkred | |
echo -en "\e]P287AF5F" #darkgreen | |
echo -en "\e]P3D7AF87" #brown | |
echo -en "\e]P48787AF" #darkblue |
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
;;; str-split : Apr 2006 Doug Hoyte, hcsw.org. | |
;;; ---- | |
;;; Splits a string 'str into a list of strings | |
;;; that were separated by the delimiter character 'ch | |
;;; ---- | |
;;; Efficient as possible given that we can't count on | |
;;; 'str being an immutable string. | |
(define (str-split str ch) | |
(let ((len (string-length str))) |