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
| echo "alias docker-clean-unused='docker system prune --all --force --volumes' | |
| alias docker-clean-all='docker container stop $(docker container ls -a -q) && docker system prune -a -f --volumes'" \ | |
| >> ~/.bashrc && source ~/.bashrc | |
| https://hackernoon.com/clean-out-your-docker-images-containers-and-volumes-with-single-commands-b8e38253c271 |
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
| </<template> | |
| <div> | |
| <el-input type="text" v-model="displayValue" @blur="isInputActive = false" @focus="isInputActive = true" /> | |
| </div> | |
| </template> | |
| <script> | |
| export default { | |
| props: ["value"], |
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
| function slasher(arr, howMany) { | |
| var x = arr.splice(howMany, arr.length) | |
| return x; | |
| } | |
| slasher([1, 2, 3], 2); |
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
| function destroyer(arr) { | |
| var cleanArray = arguments[0]; | |
| for (var i = 1; i < arguments.length; i ++){ | |
| cleanArray = without(cleanArray, arguments[i]); | |
| } | |
| return cleanArray; | |
| } | |
| function without(array, what){ |
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
| function where(arr, num) { | |
| // Find my place in this sorted array. | |
| console.log(getMax(arr)) | |
| if (num > getMax(arr)){ | |
| console.log(getMax(arr)) | |
| return arr.length | |
| } | |
| var sortedArray = arr.sort(function(a,b){return a > b}); | |
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
| function slasher(arr, howMany) { | |
| // it doesn't always pay to be first | |
| return arr; | |
| } | |
| slasher([1, 2, 3], 2); |
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
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| backgroundImage.frame = CGRectMake(0, 0, view.bounds.width, view.bounds.height) | |
| backgroundImage.contentMode = .ScaleAspectFill | |
| view.addSubview(backgroundImage) | |
| view.sendSubviewToBack(backgroundImage) | |
| } |
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
| let backgroundImage = UIImageView(image: UIImage(named: "backgroundImage")) |
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
| override func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { | |
| let header = tableView.dequeueReusableCellWithIdentifier(kHeaderCellIdentifier) as RWStockHeaderCell | |
| header.selectionStyle = UITableViewCellSelectionStyle.None | |
| header.backgroundColor = kbackgroundColor | |
| header.layer.borderWidth = 1 | |
| header.layer.borderColor = UIColor.whiteColor().CGColor | |
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
| import UIKit | |
| import Parse | |
| class myGalleryVC: PFQueryCollectionViewController, UISearchBarDelegate { | |
| var clockRefresh = clockRefreshControl(frame: CGRectNull) | |
| var gestureRecognizer = UIGestureRecognizer() | |
| var isSearching = false | |
| var searchText: String? | |