This file contains 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 |
This file contains 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 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 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 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 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 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
#include <iostream> | |
using namespace std; | |
typedef unsigned short u16; | |
typedef unsigned int u32; | |
typedef int s32; | |
typedef wchar_t wc; | |
static s32 |
This file contains 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 | |
mkdir -p "source" | |
curl -RL# "https://class.coursera.org/ml-005/lecture/download.mp4?lecture_id=[1-114]" -o "source/lecture#1.mp4" | |
rm "source/lecture94.mp4" | |
mkdir -p "fixed" |
This file contains 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
// | |
// MathCalc: a parser for basic mathematical expressions | |
// From here: https://paiv.github.io/blog/2016/03/23/js-calc.html | |
// | |
// | |
// Copyright (c) 2016, Pavel Ivashkov, github.com/paiv | |
// | |
// Permission to use, copy, modify, and/or distribute this software for any | |
// purpose with or without fee is hereby granted, provided that the above | |
// copyright notice and this permission notice appear in all copies. |
This file contains 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
#include <iostream> | |
#include <bigd.h> // http://www.di-mgt.com.au/bigdigits.html | |
using namespace std; | |
namespace paiv | |
{ | |
typedef uint32_t u32; | |
class Big | |
{ |
OlderNewer