Skip to content

Instantly share code, notes, and snippets.

@rofrol
rofrol / jsx-cheatsheet.md
Last active December 13, 2020 08:51
jsx cheatsheet

Mój krótki poradnik o JSX

Wstęp

To nie jest style guide, więc można za pewne ładniej to napisać. Poradnik ma zwięźle pokazać działanie JSX.

JSX

JSX to jakby HTML. Składnia XML, ale zmieszany z javascriptem:

@rofrol
rofrol / .psqlrc
Created August 17, 2017 09:52 — forked from tkalfigo/.psqlrc
My .psqlrc
\set QUIET 1
\pset null '(null)'
\pset linestyle unicode
\pset border 2
\timing
\set ON_ERROR_ROLLBACK interactive
\set HISTFILE ~/.psql_history- :HOST - :DBNAME
\set HISTSIZE 2000
\set PROMPT1 '%n@%/[%M:%>] # '
\set PROMPT2 '> '
@rofrol
rofrol / .psqlrc
Created August 17, 2017 09:52 — forked from tkalfigo/.psqlrc
My .psqlrc
\set QUIET 1
\pset null '(null)'
\pset linestyle unicode
\pset border 2
\timing
\set ON_ERROR_ROLLBACK interactive
\set HISTFILE ~/.psql_history- :HOST - :DBNAME
\set HISTSIZE 2000
\set PROMPT1 '%n@%/[%M:%>] # '
\set PROMPT2 '> '
@rofrol
rofrol / .gitignore
Last active January 17, 2022 16:20
Rust + Rocket + rust-postgres
target

linter-elm-make

Always Compile Main: Yes

You can have the main paths set per project with file linter-elm-make.json and content like:

{
  "mainPaths": [
    "src/elm/Main.elm"

]

@rofrol
rofrol / Cargo.toml
Last active August 19, 2016 11:47 — forked from gkbrk/Cargo.toml
Asynchronous server example in Rust
[package]
name = "rust-async-qotd"
version = "0.1.0"
authors = ["Gökberk Yaltıraklı <[email protected]>"]
[dependencies]
tokio = { git = "https://github.com/tokio-rs/tokio" }
rand = "0.3"
[[bin]]
@rofrol
rofrol / Cycle.js timer demo.markdown
Last active January 31, 2016 21:14
Cycle.js timer demo
@rofrol
rofrol / app.js
Created January 31, 2016 20:57
cycle.js embed single in medium.com
function main({DOM}) {
const h = CycleDOM.h;
return {
DOM:
// click, click, click -> [2.. 4.. 4..]
DOM.select('button').events('click').
map(evt => parseInt(evt.target.innerText)).
filter(val => val % 2 === 0).
@rofrol
rofrol / index.html
Created January 31, 2016 20:50
cycle.js embed from another 2
<!doctype html>
<!-- https://medium.com/@fkrautwald/we-are-not-writing-much-code-5404fb7d39e -->
<div id="app"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.7/rx.all.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cyclejs-core/6.0.0/cycle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cyclejs-dom/9.0.2/cycle-dom.min.js"></script>
<script src="https://rawgit.com/rofrol/c11c3926742b0ce65b87/raw/app.js"></script>