show disk usage
df -h
who is listening ports
lsof -i -P -n | grep LISTEN
docker
remove intermediate/unused images
docker rmi $(docker images -f dangling=true -q --no-trunc) -f
show disk usage
df -h
who is listening ports
lsof -i -P -n | grep LISTEN
docker
remove intermediate/unused images
docker rmi $(docker images -f dangling=true -q --no-trunc) -f
| // | |
| // ___FILENAME___ | |
| // ___PROJECTNAME___ | |
| // | |
| // Created ___FULLUSERNAME___ on ___DATE___. | |
| // Copyright © ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved. | |
| // | |
| // Generated by Atom templates. | |
| // |
| extension State { | |
| struct <STATE_NAME>: AtomState { | |
| typealias EventType = Event | |
| static var parentClass: AtomNode.Type = <#PARENT_CLASS_TYPE#> | |
| static func react(optionalCurrent: <STATE_NAME>?, event: EventType) -> <STATE_NAME> { | |
| guard var current = optionalCurrent else { return initial() } | |
| // MARK: CardIOViewDelegate methods | |
| func cardIOView(cardIOView:CardIOView, didScanCard info:CardIOCreditCardInfo?) | |
| { | |
| guard info != nil else { return } | |
| if let cardNumber = info!.cardNumber { | |
| Dispatcher.instance.perform(Dispatcher.Action.UpdateField(key: props.cardNumberFieldKey, value: cardNumber)) | |
| } |
| #define UIColorFromHex(hexValue) \ | |
| [UIColor colorWithRed:((float)((hexValue & 0xFF0000) >> 16))/255.0 \ | |
| green:((float)((hexValue & 0x00FF00) >> 8))/255.0 \ | |
| blue:((float)((hexValue & 0x0000FF) >> 0))/255.0 \ | |
| alpha:1.0] |
| git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short" |
| #pragma mark environment definer start | |
| typedef void(^voidBlock)(); | |
| #define IS_TESTING_BUILD NO | |
| #define IS_DEBUG_BUILD NO | |
| #define IS_RELEASE_BUILD NO | |
| /// TESTING_BUILD, DEBUG_BUILD and RELEASE_BUILD setted in Prepocessor macroses (target -> Build Settings) | |
| #ifdef TESTING_BUILD | |
| #undef IS_TESTING_BUILD |
| { | |
| categories: [ | |
| '{{repeat(5)}}', | |
| { | |
| id: '{{index()+1}}', | |
| name: 'category {{index()+1}}', | |
| logo: 'http://pbnew.otgroup.kz/assets/uploads/category_logos/{{index()}}.jpg', | |
| organizations:[ | |
| '{{repeat(5)}}', | |
| { |
| { | |
| countries: [ | |
| { | |
| id: '{{index()+1}}', | |
| name: '{{country()}}', | |
| cities:[ | |
| '{{repeat(5, 7)}}', | |
| { | |
| id: '{{index()+1}}', | |
| name: '{{city()}}', |
| require 'csv' | |
| def parse(filename) | |
| result_array = [] | |
| current_record = {} | |
| File.open(filename).each do |line| | |
| # линия с '# name' в начале считается началом новой записи | |
| if line.index('# name') == 0 | |
| result_array << current_record unless current_record.empty? |