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
rm -rf node_modules/ && npm cache clean && npm install |
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
Server | |
hexo server | |
For deploy on github | |
hexo deploy | |
When add css etc need to clean before push | |
hexo clean | |
Scaffold a post |
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
import UIKit | |
class ViewController: UIViewController { | |
var images = [UIImageView]() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
} |
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
shadowOffset:{ | |
width: 10, | |
height: 10, | |
}, | |
shadowColor: 'black', | |
shadowOpacity: 1.0 |
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
// Disable the current file | |
/* eslint-disable */ | |
// Disable the current line | |
// eslint-disable-line no-use-before-define |
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
lsof -n -i4TCP:8081 |
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 const loadState = () => { | |
try { | |
const auth = localStorage.getItem('name'); | |
if (auth === null) return undefined; | |
return JSON.parse(auth); | |
} catch (err) { | |
return undefined; | |
} | |
} |
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 getDrink (type) { | |
var drinks = { | |
'coke': 'Coke', | |
'pepsi': 'Pepsi', | |
'lemonade': 'Lemonade', | |
'default': 'Default item' | |
}; | |
return 'The drink I chose was ' + (drinks[type] || drinks['default']); | |
} |
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
import React from 'react'; | |
const checkSize = size => { | |
switch (size) { | |
case 'large': | |
return 100; | |
case 'medium': | |
return 75; | |
default: | |
return 50; |
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
import React from 'react'; | |
import { ListView } from 'react-native'; | |
export default class extends React.PureComponent { | |
constructor(props) { | |
super(props); | |
const { data, dataSource, rowHasChanged: _rowHasChanged } = props; | |
this.state.data = data || []; |
OlderNewer