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
#!/bin/bash | |
set -e | |
FILE=$1 | |
TEMPFILE=`mktemp` | |
cat > "$TEMPFILE" <<'LicenseText' | |
/* | |
* Copyright (c) <year> <copyright holders> | |
* |
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
# download | |
curl -RLO "http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.gz" | |
tar -xzf boost_1_58_0.tar.gz | |
cd boost_1_58_0 | |
# build tools | |
./bootstrap.sh --prefix=./dist | |
./b2 tools/bcp | |
# extract selected libraries |
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
val boot = new Bootstrap() | |
.group(new NioEventLoopGroup()) | |
.channel(classOf[NioSocketChannel]) | |
.resolver(new DnsNameResolverGroup(classOf[NioDatagramChannel], DnsServerAddresses.defaultAddresses())) | |
.option(ChannelOption.TCP_NODELAY, java.lang.Boolean.TRUE) | |
val channelFuture = boot.connect(host, port) | |
channelFuture.addListener(new ChannelFutureListener { | |
override def operationComplete(future: ChannelFuture): Unit = |
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
- (NSString *)stringWithFormat:(NSString *)format args:(NSArray *)args | |
{ | |
NSMutableData *data = [NSMutableData dataWithLength:(sizeof(id) * args.count)]; | |
[args getObjects:(__unsafe_unretained id *)data.mutableBytes range:NSMakeRange(0, args.count)]; | |
NSString *so = [[NSString alloc] initWithFormat:format arguments:data.mutableBytes]; | |
return so; | |
} |
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
// | |
// FontsTableViewController.m | |
// | |
// Created by Pavel Ivashkov on 3/30/11. | |
// | |
@implementation FontsTableViewController | |
- (id)initWithStyle:(UITableViewStyle)style | |
{ |
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
ffmpeg -y -i track.mp3 -vcodec ppm -r 72 -f image2pipe -i gource.ppm -vcodec mpeg4 -r 29.97 -preset veryslow -q:v 1 -threads 0 -b:v 10000k -bf 0 -comp_duration 204 -ac 2 -acodec copy output.mp4 |
NewerOlder