Skip to content

Instantly share code, notes, and snippets.

View carlos8f's full-sized avatar

Starbuck Starfish carlos8f

View GitHub Profile
@AndreasMadsen
AndreasMadsen / WhatIHaveDone.md
Last active February 13, 2022 16:15
Playing with smartos
@carlos8f
carlos8f / gist:3473107
Last active September 5, 2020 15:44
siege Mac OS X caveats
Mac OS X has only 16K ports available that won't be released until socket
TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds.
Consider reducing in case of available port bottleneck.
You can check whether this is a problem with netstat:
# sysctl net.inet.tcp.msl
net.inet.tcp.msl: 15000
# sudo sysctl -w net.inet.tcp.msl=100
@frsyuki
frsyuki / my_thoughts_on_msgpack.md
Created June 11, 2012 02:36
My thoughts on MessagePack

My thoughts on MessagePack

Hi. My name is Sadayuki "Sada" Furuhashi. I am the author of the MessagePack serialization format as well as its implementation in C/C++/Ruby.

Recently, MessagePack made it to the front page of Hacker News with this blog entry by Olaf, the creator of the Facebook game ZeroPilot. In the comment thread, there were several criticisms for the blog post as well as MessagePack itself, and I thought this was a good opportunity for me to address the questions and share my thoughts.

My high-level response to the comments

To the best of my understanding, roughly speaking, the criticisms fell into the following two categories.

/**package
* { "name": "npm-test-single-file"
* , "main": "index.js"
* , "version": "1.2.3"
* , "description":"No package.json in sight!"
* , "dependencies": { "minimatch": "*" }
* }
**/
module.exports = "I'm just a lonely index, naked as the day I was born."
@carlos8f
carlos8f / gist:1318025
Created October 26, 2011 22:01
Require FC session on a Convio page
<script type="text/javascript" src="//s3.amazonaws.com/connect.freedomworks.org/scripts/convio.js"></script>
<script type="text/javascript">
function checkSession(session) {
if (!session.uid) {
window.location.href = FC_Convio.getSSOURL();
}
}
</script>
// To just get the SSO URL (button href), you can do:
var sso_url = FC_Convio.getSSOURL( [dest] );
// To just get the profile edit URL, you can do:
var profile_edit_url = FC_Convio.getProfileEditURL();
var passthru_url = FC_Convio.getPassthruURL('http://fw.convio.net/site/PageServer?pagename=deploymenthome');
document.writeln('<p><a href="' + passthru_url + '">' + passthru_url + '</a></p>');
FC_Convio.embedEditProfileLink();
FC_Convio.embedLoginButton('http://fw.convio.net/site/PageServer?pagename=deploymenthome');
<script type="text/javascript">
<!--//--><![CDATA[//><!--
FC_Convio.embedLoginButton('http://fw.convio.net/site/PageServer?pagename=deploymenthome');
//--><!]]>
</script>