Notice AbstractResourceController
has the actual lookup methods (all of which work). But when an AbstractAssembler
implementation builds the links, we don't get the Controller
's base URL appended (compare theoutput.json
's self vs address ref)
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
SSID BSSID RSSI CHANNEL HT CC SECURITY (auth/unicast/group) | |
CenturyLink7173 fe:f5:28:2b:7f:40 -83 9,-1 Y US WPA(PSK/TKIP,AES/TKIP) WPA2(PSK/TKIP,AES/TKIP) | |
Holms01 40:4a:03:df:d3:77 -88 3 N -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP) |
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
# Generate our cert and key | |
openssl req -x509 -days 10000 -newkey rsa:2048 -keyout key.pem -out setup.crt -subj '/' | |
# Strip the password off the key | |
openssl rsa -in key.pem -out key.pem | |
# Encrypt our file | |
openssl smime -encrypt -aes256 -binary -outform PEM -in file.txt -out file.aes setup.crt | |
# Decrypt our file | |
openssl smime -decrypt -inform PEM -binary -in file.aes -inkey key.pem -out decrypted.txt |
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
@RestController | |
@RequestMapping("/$batch") | |
public class BatchRequestController { | |
@Inject | |
private List<RequestMappingHandlerMapping> mappings; | |
@Inject | |
private List<HandlerAdapter> handlerAdapters; |
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
@Configuration | |
public class SampleConfig<T> { | |
@Bean | |
public Service<T> service(){ | |
return new Service<T>(repo()); | |
} | |
@Bean | |
public Repository<T> repo(){ |
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
public class Consumer{ | |
// these work with qualifiers... | |
@Inject | |
private GenericService<User, Long> userService; | |
@Inject | |
private GenericService<Organization, Long> orgService; | |
} |
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
@Component | |
public class Foo extends InstantiationAwareBeanPostProcessorAdapter implements BeanDefinitionRegistryPostProcessor { | |
@Override | |
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry defRegistry) throws BeansException { | |
DefaultListableBeanFactory registry = (DefaultListableBeanFactory) defRegistry; | |
Map<String,JpaRepository> repos = registry.getBeansOfType(JpaRepository.class); | |
// Repos is always empty :( | |
Set<Class<?>> entities = new Reflections("com.example").getTypesAnnotatedWith(Entity.class); | |
for(Class<?> entity : entities){ |
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
var path = require('path'); | |
var through = require('through'); | |
var File = require('gulp-util').File; | |
module.exports = function(){ | |
var files = []; | |
function onStream(file){ | |
files.push(file); | |
} |
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
function git_prompt_info() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
} | |
function get_pwd() { | |
print -D $PWD | |
} | |
function battery_charge() { |
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
app.directive('colorPicker', function() { | |
return { | |
scope: { | |
color: '=colorPicker' | |
}, | |
link: function(scope, element, attrs) { | |
element.colorPicker({ | |
// initialize the color to the color on the scope | |
pickerDefault: scope.color, | |
// update the scope whenever we pick a new color |