Skip to content

Instantly share code, notes, and snippets.

View A-gambit's full-sized avatar

Gregory Shekhet A-gambit

View GitHub Profile
@A-gambit
A-gambit / REACTIVE2016-LIGHTNING-PROPOSAL.md
Last active February 22, 2024 18:24
Proposal for lightning talk at ReactiveConf 2016: Road from UndefinedLand

Proposal for a lightning talk at the Reactive 2016.

Keep calm and like/retweet it on Twitter and star this Gist to vote on this talk.

Road from UndefinedLand

Undefiend

I work at Grammarly. We like React and happily use it in our applications. However, sometimes something goes wrong and bugs creep into the code. Here comes testing. It helps make us confident about the quality of our code.

@A-gambit
A-gambit / ReactiveConf2017.md
Last active June 19, 2021 16:57
Proposal for lightning talk at ReactiveConf 2017: How do you make friends with React and FRP? 🤔 Start to develop your application using Focal.

How do you make friends with React and FRP? 🤔 Start to develop your application using Focal.

This is a CFP for the ⚡️Lightning⚡️ talk at awesome ReactiveConf 2017. If you'd like to see this talk, please 🌟 star🌟 this summary and retweet my tweet 🙂 #ReactiveConf

image

Functional reactive programming (FRP) is very popular nowadays. The JavaScript community provides us with excellent tools like RxJS, Bacon, and Kefir. But, as we know, they have nothing to do with React. So how we can use the power of FRP in our React application? Using the correct state management, we can make friends with FRP and React and make our application truly reactive. In my lightning talk, I will talk about Focal

export class UndoAtom<T> {
private _atom: Atom<T>
_undo: Array<T>
_redo: Array<T>
constructor(atom: Atom<T>) {
this._atom = atom
this._undo = []
this._redo = []
@A-gambit
A-gambit / task.md
Last active November 14, 2016 22:16

#Задание 1 - Верстка

Сверстать старницу для всех размеров экрана указаных в макабах на React.js (JSX): Cтраница

Требования:

  • Сделать как минимум хедер + одина из секций
  • Можно использывать препроцесор (SASS/Less/Stylus)
  • Задание отправить линком на JSFiddle/JSBin/СodePen/GithubPages
module Game where
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Signal exposing (Address)
import StartApp.Simple as StartApp
//server
io.on('connection', socket => {
//read and send file
......
//update and send data
socket.on('updateFile', data => {
//update your file
...
//send new on client
socket.emit('updateData', data)
const cities = $('tr')
.toArray()
.filter(x => x.innerText.includes('°'))
.map(x => ['name', 'lat', 'lng'].reduce((loc, key, i) => {
loc[key] = x.children[i].innerText
return loc
}, {}))
//http://www.mapsofworld.com/lat_long/ukraine-lat-long.html
"ER_WRONG_FIELD_WITH_GROUP: Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dbcomputerscience.full_name_cs_program.Group' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"
@A-gambit
A-gambit / 1
Created October 24, 2015 14:56
https://maps.googleapis.com/maps/api/place/textsearch/json?query=%D0%BE%D0%B1%D0%BB%D0%B0%D1%81%D1%82%D1%96+%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D0%B8&types=administrative_area_level_1&key=AIzaSyBXFVt9Iq6w0ORx-YocIbpbVXW3KAk23xo
object Count {
def count(i: Int, array: List[Int], max: Int):Int =
if (array.length == max)
1
else if (i > 4 && !(array contains (i - 3)) && (array contains (i - 1)))
0
else
List(i - 2, i - 1, i + 1, i + 2).foldLeft(0)((res: Int, x: Int) =>
if (!(array contains (x)) && x <= max && x >= 2) res + count(x, array :+ x, max)