- Simple, modern networking broker
- Built-in support to libzrt
- http server
- nginx
- fastcgi
- libzrt
- 1 http frontend + 1 daemon backend
- factor some
object-query
functionality into this - need good multiplexing file/stream transfer
- no discovery needed
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
-module(fib). | |
fib(Term) -> | |
fib(Term, 1, 0). | |
fib(0, _Val, Prev) -> | |
Prev; | |
fib(1, Val, _Prev) -> | |
Val; | |
fib(Term, Val, Prev) -> |
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
# Use git and git+ssh instead of https | |
[url "git://github.com/"] | |
insteadOf = https://github.com/ | |
[url "git@github.com:"] | |
pushInsteadOf = "git://github.com/" | |
[url "git@github.com:"] | |
pushInsteadOf = "https://github.com/" |
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
# to run: | |
# gunicorn --workers=3 --worker-class sync gu:app | |
# gunicorn --workers=3 --worker-class gevent gu:app | |
# etc. | |
import threading | |
import os | |
def app(environ, start_response): |
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
import java.lang.management.ManagementFactory; | |
import com.sun.management.OperatingSystemMXBean; | |
public class Test { | |
public static void main(String [] args) { | |
// Probably this can vary, depending on whether you run from | |
// command line or from an IDE. | |
final int startingThreadCount = Thread.activeCount(); | |
System.out.printf("Starting thread count: %d%n", startingThreadCount); |
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
import java.awt.Dimension; | |
import java.awt.GridBagConstraints; | |
import java.awt.GridBagLayout; | |
import java.awt.KeyboardFocusManager; | |
import java.awt.event.KeyEvent; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; | |
import javax.swing.JPanel; |
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) 2015, Lars Butler | |
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 | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
$script = <<SCRIPT | |
# TODO: Put your install script here. | |
SCRIPT |
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
/** | |
* Most of the credit for this code goes to: | |
* http://opendatastructures.org/ods-java/2_Array_Based_Lists.html | |
* Code from opendatastructures.org is licensed under the Creative Commons | |
* License. See: | |
* - http://opendatastructures.org/ | |
* - https://creativecommons.org/licenses/by/2.5/ca/ | |
* | |
* I wanted to include a proper copyright notice, but opendatastructures.org |
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
1. Install Vagrant: http://www.vagrantup.com/downloads.html | |
2. Install VirtualBox: https://www.virtualbox.org/wiki/Downloads | |
3. Put Vagrantfile and vagrant-bootstrap.sh in some working directory | |
4. Open a shell, cd to that directory. | |
5. Run `vagrant up`. This will create the VM and run the vagrant-bootstrap.sh script | |
Other useful commands (run these from the same directory as the Vagrantfile) | |
- `vagrant halt`: shut down a machine | |
- `vagrant destroy -f`: destroy a machine; -f/--force is useful if the machine is running |
NewerOlder