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/bash | |
# Path to the external drive | |
EXTERNAL_DRIVE="$1" | |
# Remove .DS_Store, .Trashes, and Icon files | |
find "$EXTERNAL_DRIVE" -name ".DS_Store" -delete | |
find "$EXTERNAL_DRIVE" -name "Icon\r" -delete | |
find "$EXTERNAL_DRIVE" -name ".Trashes" -exec rm -rf {} + |
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
// Define all your icons once, | |
// load them once, | |
// and use everywhere | |
import Ionicons from 'react-native-vector-icons/Ionicons'; | |
import FontAwesome from 'react-native-vector-icons/FontAwesome'; | |
// define your suffixes by yourself.. | |
// here we use active, big, small, very-big.. | |
const replaceSuffixPattern = /--(active|big|small|very-big)/g; |
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
class ConvertibleComponent extends React.Component { | |
render() { | |
return this[this.constructor.name](this.props); | |
} | |
} | |
// Lets say you have a component whose final code you aren't certain about yet. | |
// 1. as functional component: | |
function MyComponent(props) { |