Skip to content

Instantly share code, notes, and snippets.

@rofrol
rofrol / migration_from_actix-web-0.7.19_to_1.0.0-beta.5.md
Created May 17, 2019 16:28
migration_from_actix-web-0.7.19_to_1.0.0-beta.5.md
diff --git a/mock/server/src/main.rs b/mock/server/src/main.rs
index 91dbf9c7..f53b9dd6 100644
--- a/mock/server/src/main.rs
+++ b/mock/server/src/main.rs
@@ -1,4 +1,3 @@
-extern crate actix;
extern crate actix_web;
extern crate bytes;
extern crate env_logger;
@rofrol
rofrol / Green.Book.2018.2160p.UHD.BluRay.X265-IAMABLE.srt.diff
Created May 19, 2019 11:56
Changes to original Green.Book.2018.2160p.UHD.BluRay.X265-IAMABLE.srt
```diff
diff --git a/Green.Book.2018.2160p.UHD.BluRay.X265-IAMABLE.srt b/Green.Book.2018.2160p.UHD.BluRay.X265-IAMABLE.srt
index 11a1f37..19cc58e 100644
--- a/Green.Book.2018.2160p.UHD.BluRay.X265-IAMABLE.srt
+++ b/Green.Book.2018.2160p.UHD.BluRay.X265-IAMABLE.srt
@@ -1,4 +1,4 @@
-1
+1
00:01:22,886 --> 00:01:27,734
Witaj Nowy Jorku! Jestem Bobby Rydell
@rofrol
rofrol / Explain Monad using Elm.md
Last active March 25, 2020 01:40
Explain Monad using Elm - WIP
function flatten(array) {
let i = 0;
while (i < array.length) {
if (!Array.isArray(array[i])) {
i++
} else {
array.splice(i, 1, ...array[i])
}
}
}
(function() {
/* This function forces rustdoc to collapse documentation for all items,
except for the methods defined in an impl block and the primary type's
declaration. This is the most natural view IMO, since it provides the
primary type along with an easy to scan overview of available methods.
rustdoc does seemingly have user settings that purport to make this the
default, but I could never cause them to work in a reliably consistent
way. This is especially useful when writing documents, where you commonly
want to refresh and look at the docs for the specific item you're working
@rofrol
rofrol / watched.txt
Last active April 1, 2020 19:28
watched.md
'[AgusiQ-TorrentS.pl] Contratiempo.2016.NAPISY PL-MX [AgusiQ]'
'[ALETORRENTY.PL]Savior (1998)-alE13'
'[Devil-TorrentS.pl] Klaus.2019.PLDUB.1080p.NF.WEB-DL.x264.AC3-KiT'
'000Bruce Lee'
'12 Years a Slave (2013)'
'12.Strong.2018.1080p.BluRay.x264-GECKOS[rarbg]'
'3 Days to Kill (2014)'
''\''71 (2014) [1080p]'
A.Quiet.Place.2018.Multi.UHD.2160p.BluRay.x265.HDR.Atmos.7.1-DTOne
Abominable.2019.1080p.WEB-DL.DD5.1.H264-FGT
// https://dmitripavlutin.com/react-hooks-stale-closures/
function createIncrementFixed(i) {
let value = 0;
function increment() {
value += i;
console.log(value);
return function logValue() {
const message = `Current value is ${value}`;
console.log(message);
  • 61.49 brutto 600 mb/s 24 mc
    • 86 brutto z tv
    • po 21 mc można renegocjować
  • 67.64 brutto 12 mc,
  • rozmawiałem z: Joanna Łątkowska
@rofrol
rofrol / UrlSearchParams_confused.js
Last active June 3, 2020 13:04
Why it does not console.log cf_callType?
{
const callFormPrefix = 'cf_';
let searchParams = new URLSearchParams("MDN=12341234&cf_mdn=12341234&cf_callReason=R3&cf_callType=Escalation");
console.log(searchParams.toString());
for (let [key] of searchParams) {
console.log('key', key)
if (key.startsWith(callFormPrefix)) {
console.log('starts2:', key)
searchParams.delete(key);
}
@rofrol
rofrol / dns-sync.sh
Last active August 31, 2020 08:15 — forked from matthiassb/dns-sync.sh
Init.d script for keeping WSL resolv.conf in-sync with Windows
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO