foremost + поиск по hex сигнатуре ключевой фразы
foremost + поиск по hex сигнатуре ключевой фразы
Get http://nexus:8083/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
nexus:
image: sonatype/nexus3:3.22.0
volumes:
- nexusvolume:/nexus-data
ports:
- "8081:8081"
- "8083:8083"
- "8082:8082"
127.0.0.2 nexusнаверняка, работало бы и 127.0.0.1
@Bean("messageSource") public ReloadableResourceBundleMessageSource messageSource() { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); messageSource.setBasename("classpath:messages/messages"); // любой путь к файлу messageSource.setDefaultEncoding("UTF-8"); return messageSource;}
// Ключевое - ReloadableRes.... - reloadable - поддержка любого пути.
@Componentpublic class Translator { private static MessageSource messageSource; @Autowired Translator(MessageSource messageSource) { Translator.messageSource = messageSource; } public static String toLocale(String msgCode, Object[] args) { Locale locale = LocaleContextHolder.getLocale();// Locale tmp = new Locale("ru"); return messageSource.getMessage(msgCode, args, locale); } }
Translator.toLocale("respMsg.savedOK", null)
respMsg.savedOK=Сохранено
@RequestMapping("/path/{variableAbleCaptureSlashes:.+}// нужно, чтобы в var могли падать значения с прямыми слэшами
public ResponseEntity<String> method(@PathVariable("variableAbleCaptureSlashes") var) {
// var must accept values like "/a/b/"
}
System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "true");
@Override public void configurePathMatch(PathMatchConfigurer configurer) { UrlPathHelper urlPathHelper = new UrlPathHelperNonDecoding(); urlPathHelper.setUrlDecode(false); configurer.setUrlPathHelper(urlPathHelper); }
@SpringBootApplication @EnableErrorHandlingpublic class Application extends WebMvcConfigurerAdapter { public static void main(String[] args) { System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "true"); SpringApplication.run(Application.class, args); } @Override public void configurePathMatch(PathMatchConfigurer configurer) { UrlPathHelper urlPathHelper = new UrlPathHelperNonDecoding(); urlPathHelper.setUrlDecode(false); configurer.setUrlPathHelper(urlPathHelper); } public class UrlPathHelperNonDecoding extends UrlPathHelper { public UrlPathHelperNonDecoding() { super.setUrlDecode(false); } @Override public void setUrlDecode(boolean urlDecode) { if (urlDecode) { throw new IllegalArgumentException("Handler does not support URL decoding."); } } @Override public String getServletPath(HttpServletRequest request) { String servletPath = getOriginatingServletPath(request); return servletPath; } @Override public String getOriginatingServletPath(HttpServletRequest request) { String servletPath = request.getRequestURI().substring(request.getContextPath().length()); return servletPath; } } }
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns="http://www.springframework.org/schema/beans"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd">
<beans>
<!-- Setting AllowChunking="false" activates NTLM authentication.
Basic authentication will be used without it -->
<http-conf:conduit name="*.http-conduit"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns="http://cxf.apache.org/transports/http/configuration">
<http-conf:client
ConnectionTimeout="1000"
ReceiveTimeout="10000"
AllowChunking="false" />
<http-conf:authorization>
<sec:UserName>${auth.username}</sec:UserName>
<sec:Password>${auth.password}</sec:Password>
</http-conf:authorization>
</http-conf:conduit>
<!--WS Clients-->
<jaxws:client id="ws-client-id"
serviceClass="com.microsoft.schemas.sharepoint.soap.XXXX"
address="${endpoints.someaddress}">
</jaxws:client>
</beans>
</beans>
Finally, you need to setup the CXF client to turn off chunking. The reason is that the NTLM authentication requires a 3 part handshake which breaks the streaming.
//Turn off chunking so that NTLM can occurClient client = ClientProxy.getClient(port);HTTPConduit http = (HTTPConduit) client.getConduit();HTTPClientPolicy httpClientPolicy =newHTTPClientPolicy();httpClientPolicy.setConnectionTimeout(36000);httpClientPolicy.setAllowChunking(false);http.setClient(httpClientPolicy);
comp-lzo no
для ubuntu 64bit стоит заменить наCFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer"
Соответственно, все обращения к каталогу src/unix/release-x86-Linux/ следует заменить на src/unix/release-x86_64-Linux/. Этот каталог (release-XXXX) будет единственным созданным внутри src/unix/, поэтому его имя будет очевидным.CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
unsigned p1[1024], p2[1024];на
unsigned p1[2048], p2[2048];Затем проделать повторную сборку (удалить каталог unix/release-x86_64-Linux/, вызвать make и переписать получившиеся исполняемый .exe и библиотечные файлы .so в целевой каталог с игрой, как в мануале).
Создаем директорию:
$ mkdir -p ~/.iso/boot/grub
В этой директории любым способом создал файл grub.cfg следующего содержания:
(Раздел menuentry «Windows 7» скопировать со своего grub.cfg, расположенного по адресу /boot/grub/)
insmod part_msdos
set default=0
set timeout=0
menuentry "Windows 7 (loader) (on /dev/sda3)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos3)'
search --no-floppy --fs-uuid --set=root C070671099FC2625
chainloader +1
}
Здесь убрано все лишнее, GRUB проскакивает быстро и незаметно.
Создаем iso-образ с GRUB2:
$ grub-mkrescue --output=/home/$USER/.iso/grub.iso /home/$USER/.iso/
Создаем VMDK-образ:
$ VBoxManage internalcommands createrawvmdk -filename /home/$USER/VirtualBox/Windows7.vmdk -rawdisk /dev/sda -partitions 3,5 -relative
Далее создаем и настраиваем виртуальную машину так же как и во втором способе.
Так же выбираем grub.iso.
Едиственный нюанс: при автоматической установке дополнений гостевой оси, образ этого iso заменится на VBoxGuestAdditions.iso. Поменяйте его обратно.
Еще раз повторюсь, в примерах используются мои настройки. Вносите изменения.
cat origin.file | iconv -f utf8 -c -t cp1251//TRANSLIT | iconv -f utf8 -c -t cp1251 | iconv -f cp1251 -c -t utf-8 | sed 's/?/И/g' > fixed.file
Пример консольного вывода после шлёпанья по кнопкам:xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
$ xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
36 Return
40 Cyrillic_ve
45 Cyrillic_el
38 Cyrillic_ef
139 Undo
190 Redo
68 F2
69 F3