This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import storageFactory from "./storageFactory"; | |
export const localStore = storageFactory(localStorage); | |
export const sessionStore = storageFactory(sessionStorage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder] | |
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUN ["apt-get", "update"] | |
RUN ["apt-get", "install", "-y", "zsh"] | |
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true | |
# docker exec -it my-app-container /bin/zsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios"; | |
export default async function () { | |
const { data: { id } } = await axios.get("//localhost:3000/id"); | |
const { data: { group } } = await axios.get("//localhost:3000/group"); | |
const { data: { name } } = await axios.get(`//localhost:3000/${group}/${id}`); | |
console.log(name); // Michał | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import all | |
import Rx from "rxjs/Rx"; | |
Rx.Observable | |
.interval(200) | |
.take(9) | |
.map(x => x + "!!!") | |
.bufferCount(2) | |
.subscribe(::console.log); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* VT100 terminal reset (<ESC>c) */ | |
console.log('\033c'); | |
/* numbers comparations */ | |
> '2' == 2 | |
true | |
> '2' === 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import subprocess | |
import re | |
def convert_to(folder, source, timeout=None): | |
args = [libreoffice_exec(), '--headless', '--convert-to', 'pdf', '--outdir', folder, source] | |
process = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=timeout) | |
filename = re.search('-> (.*?) using filter', process.stdout.decode()) |
OlderNewer