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+SizeCalculation.h | |
// | |
// Created by Hans Duedal on 24/01/13. | |
// Copyright (c) 2013 OnlineCity ApS. | |
// | |
// 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. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL |
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
require 'formula' | |
class Thrift < Formula | |
homepage 'http://thrift.apache.org' | |
# The thrift.apache.org 0.9.1 archive is missing PHP ext, fixed in THRIFT-2129 | |
# By grapping the source from git instead, it's fixed, but we need to bootstrap | |
url 'https://git-wip-us.apache.org/repos/asf/thrift.git', :branch => "0.9.1" | |
version "0.9.1" | |
head do |
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
--- a/tutorial/cpp/CppClient.cpp | |
+++ b/tutorial/cpp/CppClient.cpp | |
@@ -38,9 +38,9 @@ | |
using namespace boost; | |
int main(int argc, char** argv) { | |
- shared_ptr<TTransport> socket(new TSocket("localhost", 9090)); | |
- shared_ptr<TTransport> transport(new TBufferedTransport(socket)); | |
- shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport)); | |
+ boost::shared_ptr<TTransport> socket(new TSocket("localhost", 9090)); |
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 | |
# Canonical way to install folly on OS 10.9 (Mavericks) | |
# For deps try: brew install boost glog gflags jemalloc scons autoconf automake libtool | |
git clone [email protected]:facebook/folly.git fb-folly | |
cd fb-folly | |
# Commit 79c25e6f4a breaks complilation on OS X, so checkout previous version | |
git checkout 6d89f3d33268eaa12d5eb03a4afa5caa856306c5 | |
git clone https://code.google.com/p/double-conversion/ |
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
" everything needs to be unicode. EVERYTHING | |
set encoding=utf8 | |
" always join with just one space, even between sentences | |
set nojoinspaces | |
" don't move the cursor to the start of the line when changing buffers | |
set nostartofline | |
" Yeah, we like |
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 <iomanip> | |
#include <ctime> | |
#include <cstdint> | |
uint64_t unixtime(const char* ts) { | |
std::tm tm; | |
tm.tm_year = (ts[0] - '0') * 10 + (ts[1] - '0'); | |
if (tm.tm_year < 70) tm.tm_year += 2000; | |
tm.tm_mon = (ts[2] - '0') * 10 + (ts[3] - '0'); |
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
# This file is NOT licensed under the GPLv3, which is the license for the rest | |
# of YouCompleteMe. | |
# | |
# Here's the license text for this file: | |
# | |
# This is free and unencumbered software released into the public domain. | |
# | |
# Anyone is free to copy, modify, publish, use, compile, sell, or | |
# distribute this software, either in source code form or as a compiled | |
# binary, for any purpose, commercial or non-commercial, and by any |
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
// | |
// Copyright (C) 2011-2012 Yaroslav Stavnichiy <[email protected]> | |
// Copyright (C) 2014 OnlineCity Aps <[email protected]> | |
// | |
// Inspired by: https://bitbucket.org/yarosla/nxweb/src/tip/src/lib/daemon.c | |
// | |
// Licensed under The MIT License: | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
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
# astylerc | |
align-pointer=name | |
align-reference=name | |
max-code-length=120 | |
break-after-logical | |
indent=spaces=2 | |
style=google | |
# Padding | |
pad-header |
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
--- /usr/local/lib/python2.7/site-packages/trac/web/api.py 2014-04-07 11:34:10.326789939 +0200 | |
+++ /usr/local/lib/python2.7/site-packages/trac/web/api.py 2014-06-19 12:52:08.690985738 +0200 | |
@@ -577,7 +577,7 @@ | |
self.send_header('Last-Modified', last_modified) | |
use_xsendfile = getattr(self, 'use_xsendfile', False) | |
if use_xsendfile: | |
- self.send_header('X-Sendfile', os.path.abspath(path)) | |
+ self.send_header('X-Accel-Redirect', os.path.abspath(path)) | |
self.end_headers() |