remove all branches except master
git branch -a | grep -v "master" | sed -e 's/remotes\/origin\///g' | xargs git push origin --delete| <?php | |
| $id = $this->badge_id; | |
| return \common\models\Country::find()->joinWith(['badgeCountryAccess' => function($query) use ($id){ | |
| return $query->andOnCondition(['bca_badge_id' => $id]); | |
| }])->orderBy('country_name')->all(); |
| var activeField: UITextField? = nil | |
| func registerForKeyboardNotifications(){ | |
| NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: NSNotification.Name.UIKeyboardWillShow, object: nil) | |
| NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: NSNotification.Name.UIKeyboardWillHide, object: nil) | |
| } | |
| func removeForKeyboardNotifications(){ | |
| NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIKeyboardWillShow, object: nil) | |
| NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIKeyboardWillHide, object: nil) |
| <key>NSAppTransportSecurity</key> | |
| <dict> | |
| <key>NSAllowsArbitraryLoads</key> | |
| <false/> | |
| <key>NSExceptionDomains</key> | |
| <dict> | |
| <key>cocoacasts.com</key> | |
| <dict> | |
| <key>NSIncludesSubdomains</key> | |
| <true/> |
remove all branches except master
git branch -a | grep -v "master" | sed -e 's/remotes\/origin\///g' | xargs git push origin --delete| //centering content inside scrollView | |
| override func viewDidLayoutSubviews() { | |
| super.viewDidLayoutSubviews() | |
| let offsetY = max((scrollView.bounds.height - scrollView.contentSize.height) * 0.5, 0) | |
| self.scrollView.contentInset = UIEdgeInsetsMake(offsetY, 0, 0, 0) | |
| } |
| mount --bind /tmp/smbshare /jffs | |
| nvram set sys_enable_jffs2=1 | |
| ipkg update failed for me, so I did a work-around: | |
| mkdir -p /jffs/tmp/ipkg | |
| ipkg update | |
| ipkg list |
| For anyone having this problem, try this to install it in RAM: | |
| /bin/ipkg -d /tmp/root -force-depends install tcpdump | |
| It still won't work from command prompt as usual, but you can run it like this if you have libpcap installed in jffs still: |
| #!/bin/bash | |
| # local | |
| git branch | grep -v "master" | xargs git branch -D | |
| # remote | |
| git branch -a --merged remotes/origin/master | grep -v master | grep "remotes/origin/" | cut -d "/" -f 3- | xargs -n 1 git push --delete origin |
| #!/bin/bash | |
| find . ! -name 'thumbnails' -type d -maxdepth 1 -exec rm -rf {} + |
| {"repository":{"url":"https://packagist.org/packages/YOUR PACKAGE URL"}} |