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
/* | |
* Comment's content. | |
* | |
* Another parapgraph. | |
* It's still the same paragraph. | |
* | |
* Last paragraph and line of this comment. | |
*/ |
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
// HTML/CSS-only single-page routing | |
// From article on Smashing Magazine | |
// https://www.smashingmagazine.com/2015/12/reimagining-single-page-applications-progressive-enhancement/ | |
/* | |
* HTML structure | |
<main> | |
<section class="view" id="some-view"> | |
<h2>Something</h2> | |
</section> |
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
/** | |
* Converts given given string to regexp checking globally for that string | |
* with given stops (limiters). | |
* | |
* Example: toTagRegExp('{{ }}', ' ', 'name') === /{{name}}/g | |
* | |
* @param [String] stops Start and end markers. E. g. '{{ }}', '% %' etc. | |
* @param [String] delimiter Splits left and right side of marker. E. g. ' ' | |
* @param [String] tagName | |
* @return [RegExp] |
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
// ==UserScript== | |
// @name Obstawiator | |
// @namespace Domin & Wiktor | |
// @description Skrypt zarabiający góry pieniędzy w ruletce na csgohill.com | |
// @include https://www.csgohill.com/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
//zezwalajnawklejanie | |
console.log('Obstawiator.js super by Domin & Viktor 2016 - polecam'); |
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 { compose } from 'ramda'; | |
const mapDispatchToProps = dispatch => ({ | |
performAction: compose(dispatch, createAction); | |
}); | |
// is the same (but better, because it's in pointer-free style) as | |
const mapDispatchToProps2 = dispatch => ({ | |
performAction: data => dispatch(createAction(data)), |
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 React, { Component } from 'react'; | |
import Box from 'grommet/components/Box'; | |
import Table from 'grommet/components/Table'; | |
import TableHeader from 'grommet/components/TableHeader'; | |
import TableRow from 'grommet/components/TableRow'; | |
import Heading from 'grommet/components/Heading'; | |
import Spinning from 'grommet/components/icons/Spinning'; | |
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
def u1(n): | |
return 5 | |
def u2(k, T, Tp, n): | |
if n == 0: | |
return 0 | |
return (1 - Tp/T) * u2(k, T, Tp, n - 1) + k * Tp / T * u1(n) | |
for i in range(10): |
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
from terminaltables import AsciiTable # learn more: https://python.org/pypi/terminaltables | |
def u1(n): | |
return 5 | |
def u2(k, T, Tp, n): | |
if n == 0: | |
return 0 | |
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
// Available variables: | |
// Machine (machine factory function) | |
// assign (action) | |
// XState (all XState exports) | |
const selectAgent = (_context, event) => event.agent | |
const highlightAgent = (_context, event) => event.agent | |
const saveAgentInAgentsList = (_context, event) => [event.agent] | |
const saveListings = (_context, event) => event.listings |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
OlderNewer