| #!/bin/bash | |
| # This script analyses the log files /var/log/auth.log* for | |
| # illegal break-in attempts and writes all output to $logdir. | |
| # <http://blog.philippklaus.de/2010/02/analyse-illegal-ssh-login-attempts/#comment-12211> | |
| # inspired by <http://goo.gl/QMOhiU> | |
| # and <http://filipivianna.blogspot.com/2009/10/checking-authlog-for-ssh-brute-force.html> | |
| logbasedir=~/logs |
| #!/bin/bash -e | |
| function compressResource { | |
| gzip --best --stdout "$1" >"$1.gz" | |
| touch --no-create --reference="$1" "$1.gz" | |
| echo "Compressed: $1 > $1.gz" | |
| } | |
| function main { |
| # caveat emptor, this worked for me, be careful, your milage may vary | |
| # to remove “consumer” Windows Store apps like Weather, Finance, News from Windows 8: | |
| # http://blogs.technet.com/b/deploymentguys/archive/2012/10/26/removing-built-in-applications-from-windows-8.aspx | |
| # remove the apps from the current user account. it will clean up your start screen, basically. | |
| # you will likely see errors when this runs, but it’s still effective | |
| Get-AppXPackage | Remove-AppxPackage | |
| # this removes the apps from the machine entirely |
| # curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86_64/alpine-3.3.1-x86_64.iso | |
| curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86/alpine-3.3.1-x86.iso | |
| # create hdd image (8GB) | |
| dd if=/dev/zero of=hdd.img bs=1g count=8 | |
| # extract kernel and initramfs | |
| brew install cdrtools | |
| isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/initramfs-grsec > initramfs-grsec | |
| isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/vmlinuz-grsec > vmlinuz-grsec |
This is a PoC for running PM2 as a Windows Service under the Local Service account instead of the Local System account.
pm2 or pm2-windows-service installed yet. (The Powershell script will run npm i)
pm2-service-uninstall before running this scriptnpm and npm-cache global folders should be somewhere accessible to NT AUTHORITY\LocalService.
| ### | |
| ### | |
| ### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
| ### https://christitus.com/windows-tool/ | |
| ### https://github.com/ChrisTitusTech/winutil | |
| ### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
| ### iwr -useb https://christitus.com/win | iex | |
| ### | |
| ### OR take a look at | |
| ### https://github.com/HotCakeX/Harden-Windows-Security |
| #!/bin/sh -e | |
| adb start-server || adb start-server | |
| echo "adb is started" | |
| date | |
| while [ "$(adb shell echo 1)" ]; do sleep 5; done | |
| date | |
| echo "adb is broken, restarting:" |
Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.
My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important).
During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.
Here are main principles we use to write CSS for modern (IE11+) browsers: