First I created 3 droplets on digital ocean with 4-cores and 8GB of RAM. Login as root to each and run:
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 4000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
package yourgaeproject | |
// go-iap doesn't work for GAE since we need to use urlfetch | |
// | |
// Copy this source file to your GAE to your project. | |
// | |
// The API is mostly the same as go-iap. I prefixed some stuff since this file lives within my GAE project's package. | |
// client, err := PlaystoreNew(ctx, jsonKey) | |
// | |
// purchase, err := client.VerifyProduct("com.you.yourapp", productId, purchaseToken) |
using UnityEngine; | |
public class UISortBehavior : MonoBehaviour | |
{ | |
public UIWidget widgetInFrontOfMe; | |
[System.NonSerialized] | |
Renderer m_renderer; | |
void Awake() { |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
on searchReplace(theText, SearchString, ReplaceString) | |
set OldDelims to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to SearchString | |
set newText to text items of theText | |
set AppleScript's text item delimiters to ReplaceString | |
set newText to newText as text | |
set AppleScript's text item delimiters to OldDelims | |
return newText | |
end searchReplace |
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
# Tests for antialiasing a high-frequency image in various ways | |
# Nathan Reed, July 2014 | |
# Written for Python 3.4; requires numpy and Pillow to be installed | |
import concurrent.futures | |
import math | |
import multiprocessing | |
import numpy as np | |
import optparse | |
import random |