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
pub fn run() { | |
let contents = read_to_string("test-package.json").expect("Failed to read json file"); | |
println!("{}", contents); | |
let indent = detect_indent::detect_indent(&contents); | |
let is_end_with_newline = contents.ends_with('\n'); | |
let mut v: serde_json::Value = | |
serde_json::from_str(&contents).expect("Failed to parse json file"); | |
println!("{:?}", v); | |
if let Some(map) = v.as_object_mut() { |
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
// form.js and home.js are in the same dir | |
// If ES5, var Home = React.createClass({....}) | |
class Form extends Component { | |
// If ES5, do not need this | |
constructor(props, contexts) { | |
super(props, contexts); | |
} |
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 | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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
<!doctype html> | |
<html> | |
<head> | |
<!-- Run in full-screen mode. --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- Make the status bar black with white text. --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |