Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/sh | |
# Configure homebrew permissions to allow multiple users on MAC OSX. | |
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine. | |
# allow admins to manage homebrew's local install directory | |
chgrp -R admin /usr/local | |
chmod -R g+w /usr/local | |
# allow admins to homebrew's local cache of formulae and source files | |
chgrp -R admin /Library/Caches/Homebrew |
/** | |
* Example of Spring 4 Properties Java Configuration, | |
* with a Database Properties table to store most values | |
* and a small application.properties file too. | |
* The Database table will take precedence over the properties file with this setup | |
*/ | |
@Configuration | |
@PropertySource(value = { "classpath:application.properties" }, ignoreResourceNotFound=true) | |
public class SpringPropertiesConfig { | |
private static final Logger log = LoggerFactory.getLogger(SpringPropertiesConfig.class); |
/** | |
* Find the longest class names in Spring. | |
* Also find FactoryFactory classes. | |
* a goof-off project by @thom_nic | |
*/ | |
import java.util.jar.* | |
defaultTasks 'longest', 'factoryfactory' |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
@Embeddable | |
public class Phone { | |
private String number; | |
private String extensionNumber; | |
//ctors | |
//getters/setters | |
} |
# http://en.wikipedia.org/wiki/Extreme_points_of_the_United_States#Westernmost | |
top = 49.3457868 # north lat | |
left = -124.7844079 # west long | |
right = -66.9513812 # east long | |
bottom = 24.7433195 # south lat | |
def cull(latlngs): | |
""" Accepts a list of lat/lng tuples. | |
returns the list of tuples that are within the bounding box for the US. | |
NB. THESE ARE NOT NECESSARILY WITHIN THE US BORDERS! |