https://passingcuriosity.com/2013/dnsmasq-dev-osx
sudo launchctl stop homebrew.mxcl.dnsmasq
sudo launchctl start homebrew.mxcl.dnsmasq
When trying to install the Cisco ASDM 6.1 on Windows 8 you might get the following error: | |
========================================== | |
Cisco ASDM-IDM Launcher Information | |
Java Runtime Environment is not installed on this machine. Please install Java Runtime Environment from http://java.sun.com/javase/downloads/ | |
========================================== | |
This works with Windows 8: | |
========================================== | |
https://YOURIPADDRESS/admin/public/asdm.jnlp |
#!/bin/bash | |
# Delete all containers | |
docker rm -f $(docker ps -a -q) | |
# Delete all images | |
docker rmi -f $(docker images -q) | |
# Remove Untagged Images | |
docker rmi $(docker images -q --filter "dangling=true") | |
# Remove Volumes | |
docker volume rm $(docker volume ls -q) |
# Java 11 | |
export JAVA_HOME=$(/usr/libexec/java_home -v 11) | |
# Java 10 | |
export JAVA_HOME=$(/usr/libexec/java_home -v 10) | |
# Java 9 | |
export JAVA_HOME=$(/usr/libexec/java_home -v 9) | |
# Java 1.8 |
sudo lsof -i :8083 |
private byte[] ConvertBitmapToByteArray(Bitmap bitmap) | |
{ | |
byte[] byteArray = new byte[bitmap.Width * bitmap.Height]; | |
for (int i = 0; i < bitmap.Width; i++) | |
{ | |
for (int x = 0; x < bitmap.Height; x++) | |
{ | |
//Get the Pixel | |
Color pixel = bitmap.GetPixel(i, x); |
public static byte[] ImageToByte(Image img) | |
{ | |
ImageConverter converter = new ImageConverter(); | |
return (byte[])converter.ConvertTo(img, typeof(byte[])); | |
} |
protected CImage getImage(String path) throws Exception { | |
BufferedImage image = ImageIO.read(new File(path)); | |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
ImageIO.write(image, "bmp", baos ); | |
baos.flush(); | |
byte[] imageInByte = baos.toByteArray(); | |
baos.close(); |
https://passingcuriosity.com/2013/dnsmasq-dev-osx
sudo launchctl stop homebrew.mxcl.dnsmasq
sudo launchctl start homebrew.mxcl.dnsmasq
FROM openjdk:8-jdk | |
ARG ARTIFACT_NAME | |
ARG SERVER_PORT=8080 | |
ARG MANAGEMENT_PORT=8000 | |
ENV SERVER_PORT ${SERVER_PORT} | |
ENV MANAGEMENT_SERVER_PORT ${MANAGEMENT_PORT} | |
EXPOSE ${SERVER_PORT} |
@Configuration | |
@EnableConfigurationProperties({ResourceProperties.class}) | |
public class WebMvcConfig extends WebMvcConfigurerAdapter { | |
@Autowired | |
private ResourceProperties resourceProperties = new ResourceProperties(); | |
@Override | |
public void addResourceHandlers(ResourceHandlerRegistry registry) { | |
Integer cachePeriod = resourceProperties.getCachePeriod(); |