Skip to content

Instantly share code, notes, and snippets.

View artyomtrityak's full-sized avatar
:octocat:
Alloha

Artem Trytiak artyomtrityak

:octocat:
Alloha
View GitHub Profile
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active May 3, 2024 12:56
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@shospodarets
shospodarets / Chrome headless Puppeteer- capture DOM element screenshot using
Last active January 17, 2023 18:52
Chrome headless Puppeteer- capture DOM element screenshot using
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Adjustments particular to this page to ensure we hit desktop breakpoint.
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1});
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'});
@ALF-er
ALF-er / ReactConf2017.md
Last active June 19, 2021 20:09
My review of speeches at React Conf 2017

Disclaimer: Многие доклады смотрелись и отчёты писались в поезде, спать хотелось капец.

Disclaimer 2: Если что, простите за орфорграфию.

Вступление, в основном - нудное бла, бла, бла. Из достижений - 547,138 ReactDevTools installed on Chrome. Тем кто териториально недалеко от San Francisco Bay Area может быть интересно, что FB проводит открытые митапы - ReactWednesday.

Докладчик харизматичный, слушать его приятно.

@ericallam
ericallam / AppComponent.js
Last active December 25, 2018 20:41
Getting React Native's Navigator and Relay to work together
import Relay, {
RootContainer,
Route
} from 'react-relay'
class SeasonRoute extends Route {
static paramDefinitions = {};
static queries = {
currentSeason: () => Relay.QL`query { currentSeason }`,
import React from 'react';
import Relay from 'react-relay';
const pageSize = 2;
class Content extends React.Component {
componentWillMount() {
this.hasNextPage = this.props.user.next ? this.props.user.next.pageInfo.hasNextPage : false;
this.hasPreviousPage = this.props.user.prev ? this.props.user.prev.pageInfo.hasPreviousPage : false;
# -*- mode: ruby -*-
# vi: set ft=ruby :
=begin
ModernIE VMs
config.vm.box = "modernIE/vista-ie7"
config.vm.box = "modernIE/w7-ie8"
config.vm.box = "modernIE/w7-ie9"
config.vm.box = "modernIE/w7-ie10"
@leotm
leotm / findAndReplace.js
Last active June 13, 2024 11:26
Node.js - Find and Replace file(s)
var glob = require('glob');
var fs = require('fs');
var replace = require('replace');
// Find file(s)
glob('fileName.txt', function(err, files) {
if (err) { throw err; }
files.forEach(function(item, index, array) {
console.log(item + ' found');
@addyosmani
addyosmani / package.json
Last active May 29, 2024 15:54
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@staltz
staltz / introrx.md
Last active June 29, 2024 15:58
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active June 28, 2024 10:38
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\