Skip to content

Instantly share code, notes, and snippets.

@ivanhub
ivanhub / win10disable-UnistackSvcGroup.how-to
Created November 2, 2017 10:40
Windows 10 disable UnistackSvcGroup Services
1)After months of research I was able to permanently disable the entire UniStackSvc group, since Regedit would not allow and change its name! In the Regedit editor, browse to HKEY_LOCAL_MACHINE \ SYSTEM \ ControlSet001 \ Services For example CDPUserSvc - the renaming will be with a numeric extension such as CDPUserSvc_26474 Go to the Start key and change it to 4 (do not load) Do this with all entries (+/- 14) Serve for other services that you. Does not want it to be loaded into memory. Only for professionals who know what they are doing! The Windows-10 was loading 120 services, now it runs fine with 80!
2)
I solved the problem by setting in the Registry the start value for these two fields from 3 (manual) to 4 (disable):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UnistoreSvc
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UserDataSvc
@ivanhub
ivanhub / encrypted-git-repo.md
Created November 7, 2017 09:31
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@ivanhub
ivanhub / frontendDevlopmentBookmarks.md
Created November 7, 2017 09:45 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@ivanhub
ivanhub / clean-git-dirs.sh
Created November 7, 2017 09:49
Clean out a directory of git repositories
#!/bin/bash
for d in `find . -maxdepth 1 -type d`
do
pushd . > /dev/null
cd "$d"
echo "Trying $d"
if [ -d .git ]
then
git clean -fdx .
@ivanhub
ivanhub / show-react.js
Created November 7, 2017 09:50
Show ReactJS elements
setInterval(
function() {
Array.prototype.slice.call(
document.querySelectorAll('[data-reactid]')
).forEach(function(element) {
element.style.background = 'rgba(255,0,0,0.1)';
});
}, 500
);
@ivanhub
ivanhub / list-angular-modules.js
Created November 7, 2017 09:50
list-angular-modules
function listServices(mod, r) {
var inj = angular.element(document).injector().get;
if (!r) {
r = {};
}
angular.forEach(angular.module(mod).requires,
function(m) {
listServices(m,r)
});
angular.forEach(angular.module(mod)._invokeQueue,
@ivanhub
ivanhub / find-save-emails.cmd
Last active November 14, 2017 13:22
Find and store emailz from any text
<# : batch script
@echo off
setlocal
cd %~dp0
powershell -executionpolicy remotesigned -Command "Invoke-Expression $([System.IO.File]::ReadAllText('%~f0'))"
endlocal
goto:eof
#>
select-string -Path text-with-emails.txt -Pattern "[A-Za-z0-9\._%-]+@[A-Za-z0-9\.-]+\.[A-Za-z]{2,4}" -AllMatches | % { $_.Matches } | select-object Value > output.txt
@ivanhub
ivanhub / email-finder-powershell.cmd
Last active November 15, 2017 06:59
Email finder from text with formatting (,)
# PowerShell cкрипт подготавливает неформатированные файлы содержащие e-mail адреса (находит их и преобразовывает в подходящий вид
# для массовой рассылки в Mozilla ThunderBird)
#
# --удаляет пробелы и одинаковые адреса--
#
<# : batch script
@echo off
setlocal
cd %~dp0
@ivanhub
ivanhub / meta-CSR.example
Created November 23, 2017 07:13
Content-Security-Policy
<meta http-equiv="Content-Security-Policy" content="font-src 'self' *.ros.academy fonts.gstatic.com fonts.googleapis.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com maxcdn.bootstrapcdn.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' www.googleadservices.com www.google-analytics.com mc.yandex.ru *.ros.academy www.google-analytics.com apis.google.com connect.facebook.net connect.ok.ru ajax.googleapis.com api-maps.yandex.ru">
@ivanhub
ivanhub / Strict-Transport-Security.htaccess
Created November 23, 2017 07:14
Strict-Transport-Security
Simple:
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
With Preload:
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS