Table of Contents
| # Split the logs in separate files | |
| echo Splitting... | |
| csplit r-ryantm '/2018-..-..T..:..:.. .* [^ ]* -> [^ ]*/' '{*}' 1>/dev/null | |
| # rename xx* to xx*-package-name | |
| echo Renaming... | |
| parallel -j30 "mv {} {}-\$(head -n1 {} | cut -d' ' -f2)" ::: xx* | |
| echo Separating... |
| #!/bin/bash | |
| sleep_time="$(( $1 - 1 ))" # subtract 1, since we wait on the 0th second. | |
| start_s="$(date +%s)" | |
| start_ns="$(date +%N)" | |
| div_whole() { | |
| # whole-number division of integers. | |
| a="$1" |
Custom format for displaying bytes as kb, mb, gb or tb.
Response to a few places on the internet: https://productforums.google.com/forum/#!topic/docs/x_T_N-yRUYg And here: https://stackoverflow.com/questions/1533811/how-can-i-format-bytes-a-cell-in-excel-as-kb-mb-gb-etc
Here is one that I have been using:
[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"
This document contains some ideas for additions to the Nix language.
The Nix package manager, Nixpkgs and NixOS currently have several problems:
- Poor discoverability of package options. Package functions have
function arguments like
enableFoo, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to
| { config, lib, pkgs, ...}: | |
| with lib; | |
| let | |
| cfg = config.services.crd; | |
| in { | |
| options = { | |
| services.crd = { | |
| enable = mkEnableOption '' | |
| chrome remote desktop, a service which allows for remote control of your desktop from anywhere. | |
| ''; |
| // Node v6.9.0 | |
| // | |
| // TEST FILE (cut down for simplicity) | |
| // To ensure Golang encrypted string can be decrypted in NodeJS. | |
| // | |
| let crypto; | |
| try { | |
| crypto = require('crypto'); |
- Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
- Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
- Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
- Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
- Kill switch: If the website
www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.comis up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).
update: A minor variant of the viru
Repair manual: http://topics-cdn.dell.com/pdf/xps-15-9560-laptop_setup%20guide_en-us.pdf
I have:
Product Name: XPS 15 9560
System BIOS: 1.0.3
Service Tag: 3862XF2
Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.
The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from