Say in a JavaScript application, we need to make a request to http://www.example.com and then log the response. Let's walk through a few ways to do it.
Here's the worst way:
var result;
{ | |
"client":{ | |
"name":"host01", | |
"address":"10.2.1.11", | |
"subscriptions":[ | |
"all", | |
"env_qa", | |
"frontend", | |
"proxy", | |
"apache" |
import org.apache.commons.configuration.AbstractConfiguration; | |
import com.netflix.config.ConcurrentCompositeConfiguration; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class ConcurrentCompositeConfigurationFactory { | |
List<AbstractConfiguration> configs = new ArrayList<AbstractConfiguration>(); | |
public void setConfigs(List<AbstractConfiguration> configs) { |
Say in a JavaScript application, we need to make a request to http://www.example.com and then log the response. Let's walk through a few ways to do it.
Here's the worst way:
var result;
# This is what I have so far. The Go 1.2 installation doesn't seem to be correct so it's still breaking. | |
rm -rf /usr/local/go/src/pkg/appengine | |
rm -rf /usr/local/go/src/pkg/appengine_internal | |
rm /usr/local/go/src/pkg/os/error_posix.go | |
wget -O golang-crosscompile-master.zip https://github.com/davecheney/golang-crosscompile/archive/master.zip | |
unzip golang-crosscompile-master.zip | |
source golang-crosscompile-master/crosscompile.bash | |
go-crosscompile-build darwin/amd64 |
#!/usr/bin/env bash | |
# | |
# Example usage: | |
# | |
# $ VERSION=1.3 sudo ./goinst.sh | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
public class ArchaiusPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer { | |
@Override | |
protected String resolvePlaceholder(String placeholder, Properties props, int systemPropertiesMode) { | |
return DynamicPropertyFactory.getInstance().getStringProperty(placeholder, "null").get(); | |
} | |
} |
sudo apt-get install golang git mercurial git clone https://github.com/hanwen/go-mtpfs.git cd go-mtpfs go build sudo mv go-mtpfs /usr/local/sbin/go-mtpfs sudo chmod a+x /usr/local/sbin/go-mtpfs sudo mkdir /media/mtp sudo chmod 775 /media/mtp sudo /usr/local/sbin/go-mtpfs -allow-other=true /media/mtp