wget http://pocoproject.org/releases/poco-1.7.3/poco-1.7.3.tar.gz
tar xzf poco-1.7.3.tar.gz
cd poco-1.7.3
./configure --minimal --static --no-samples --no-tests
time make -j4 -s
cd lib/Linux/x86_64/
for f in *.a; do "strip $f"; done
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
| /**************************************************************************** | |
| * | |
| * Copyright 2016 Samsung Electronics All Rights Reserved. | |
| * | |
| * 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 | |
| * |
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
| /* | |
| A few years ago, I tried to create an HTTP client using epoll that could manage many connections. Performance was incredibly poor due to what I determined to be too many syscalls from epoll returning on every packet received. I then moved to FreeBSD and kqueue() and got the performance I was looking for. | |
| I mentioned this on a Hackernews thread announcing a new epoll feature: https://news.ycombinator.com/item?id=17851855#17856351 | |
| @caf on HN (@keaston on GitHub) responded saying this was possible using SO_RCVLOWAT. I recall testing this a few years ago, but still could not get it working. Given that it was pretty early in my C days, it's possible I could have been doing a number of things wrong. | |
| @keaston wrote a quick server script to demonstrate this ability. Curious if this also applied to client sockets, I dug up and modified some old code to test it. |
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
| #include <event2/bufferevent.h> | |
| #include <event2/buffer.h> | |
| #include <event2/event.h> | |
| #include <event2/dns.h> | |
| #include <arpa/inet.h> | |
| #include <iostream> | |
| using namespace std; |
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
| #include <event2/bufferevent_ssl.h> | |
| #include <event2/bufferevent.h> | |
| #include <event2/buffer.h> | |
| #include <event2/event.h> | |
| #include <event2/dns.h> | |
| #include <openssl/ssl.h> | |
| #include <iostream> | |
| using namespace std; |
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
| /* | |
| Parallel processing with ordered output in Go | |
| (you can use this pattern by importing https://github.com/MarianoGappa/parseq) | |
| This example implementation is useful when the following 3 conditions are true: | |
| 1) the rate of input is higher than the rate of output on the system (i.e. it queues up) | |
| 2) the processing of input can be parallelised, and overall throughput increases by doing so | |
| 3) the order of output of the system needs to respect order of input | |
| - if 1 is false, KISS! |
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
| Shader "Custom/yar" { | |
| Properties { | |
| _ColorLow ("Color Low", COLOR) = (1,1,1,1) | |
| _ColorHigh ("Color High", COLOR) = (1,1,1,1) | |
| _yPosLow ("Y Pos Low", Float) = 0 | |
| _yPosHigh ("Y Pos High", Float) = 10 | |
| _GradientStrength ("Graident Strength", Float) = 1 | |
| _EmissiveStrengh ("Emissive Strengh ", Float) = 1 | |
| _ColorX ("Color X", COLOR) = (1,1,1,1) | |
| _ColorY ("Color Y", COLOR) = (1,1,1,1) |
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
| using UnityEngine; | |
| using System.Collections; | |
| public class TakeShot : MonoBehaviour { | |
| public float maxScale = 2048; | |
| void OnGUI() | |
| { | |
| if( GUILayout.Button("take")) |