start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| while read oldrev newrev refname | |
| do | |
| branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
| if [ "developer" == $branch ]; then | |
| echo 'start call jenkins' | |
| curl -s --user 用户名:密码 url | |
| echo 'end call jenkins' | |
| fi | |
| done |
| override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { | |
| if (indexPath.row == formList!.count - 1) { | |
| cell.separatorInset = UIEdgeInsetsMake(0, cell.bounds.size.width, 0, 0) | |
| return; | |
| } | |
| cell.separatorInset = UIEdgeInsetsZero | |
| if #available(iOS 8.0, *) { | |
| cell.preservesSuperviewLayoutMargins = false |
| Map<String, List<Pojo>> map = pojos.stream().collect(Collectors.groupingBy(Pojo::getKey)); |
| - (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
| // maybe show an action sheet with more options | |
| [self.tableView setEditing:NO]; | |
| }]; | |
| moreAction.backgroundColor = [UIColor lightGrayColor]; | |
| UITableViewRowAction *blurAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Blur" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
| [self.tableView setEditing:NO]; | |
| }]; |
| static UITableViewCell *sizingCell = nil; | |
| static dispatch_once_t onceToken; | |
| dispatch_once(&onceToken, ^{ | |
| sizingCell = [self tableView:tableView cellForRowAtIndexPath:indexPath]; | |
| }); | |
| [sizingCell setNeedsLayout]; | |
| [sizingCell layoutIfNeeded]; | |
| CGFloat height = [sizingCell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height; | |
| return height; |
| -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath | |
| { | |
| // Remove seperator inset | |
| if ([cell respondsToSelector:@selector(setSeparatorInset:)]) { | |
| [cell setSeparatorInset:UIEdgeInsetsZero]; | |
| } | |
| // Prevent the cell from inheriting the Table View's margin settings | |
| if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) { | |
| [cell setPreservesSuperviewLayoutMargins:NO]; |
| // This hack works with com.android.tools.build:gradle:0.2, won't work in later version without modification | |
| apply plugin: 'android' | |
| targetCompatibility = 1.6 | |
| sourceCompatibility = 1.6 | |
| android { | |
| target = 'android-14' |
| - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { | |
| [super touchesBegan:touches withEvent:event]; | |
| [self setBackgroundColor:[UIColor colorWithRed:227/255.0 green:227/255.0 blue:227/255.0 alpha:1.0]]; | |
| } | |
| - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { | |
| [super touchesEnded:touches withEvent:event]; | |
| [self setBackgroundColor:[UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0]]; | |
| } | |
| - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { | |
| [super touchesCancelled:touches withEvent:event]; |