Skip to content

Instantly share code, notes, and snippets.

View aleksmiller's full-sized avatar
👾
GAME OVER!

Ax Miller aleksmiller

👾
GAME OVER!
  • Ukraine
View GitHub Profile
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 15, 2024 09:41
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@listochkin
listochkin / backend-secret.md
Last active February 1, 2019 13:56
Andrey Listochkin as Backend Secret

Привет всем!

Сегодня 27 сентября 2015 годя я заканчиваю вести твиттер Backend Secret. Возможно, неделя получилась несколько малоактивной - изнь вносила свои коррективы. Тем не менее, мне очень понравилось общаться со всем вами. Я решил сделать темой недели разработку API и несколько разбавить разговоры о темах, связанных с Девопсом.

Для начала я поделился отличным видео от Dan Gebhardt об эволюции REST API. Я считаю, что это - одно из лучших видео по теме.

Ден - один из соавторов спецификации json-api - сегодня это стандарт де факто для REST API и я надеюсь, что вслед за Rails, Node, Python, PHP, Ember и Backbone он придет и на другие платформы.

Затем мы поговорили о том, какие технологии вы бы выбрали сегодня для разработки API-серверов. Больше всего люди рекомендовали Django REST и Ruby on Rails, но упоминались так же и Node, и Go. В целом все согласились, что самым лучшим вариантом будет та технология и платформа, с которой уже знако

var Dispatcher = require('the-dispatcher'),
Immutable = require('immutable'),
NotificationConstants = require('../constants/notification_constants'),
UserConstants = require('../constants/user_constants'),
UploadConstants = require('../constants/upload_constants'),
StylesheetConstants = require('../constants/stylesheet_constants'),
makeStore = require('makestore');
/**
* The Notification Store does nothing but store recent actions
@chantastic
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@imjasonh
imjasonh / markdown.css
Last active May 17, 2024 07:30
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@alanrubin
alanrubin / gulpfile.js
Last active August 29, 2015 14:16
Jest (gulp-jest) + React + React Router Testing files
/** .... **/
var $ = require("gulp-load-plugins")();
var gulp = require("gulp");
function handleError(task) {
return function(err) {
$.util.log($.util.colors.red(err));
$.notify.onError(task + " failed, check the logs..")(err);
};
@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

function WebmailViewModel() {
// Data
var self = this;
self.folders = ['Inbox', 'Archive', 'Sent', 'Spamh'];
self.chosenFolderId = ko.observable();
self.chosenFolderData = ko.observable();
self.chosenMailData = ko.observable();
// Behaviours
self.goToFolder = function(folder) { location.hash = folder };
@vasilisvg
vasilisvg / more.md
Last active December 4, 2020 04:48
This is my backup script which syncs my server to my dropbox every day.

The script below is triggered every day from my Mac. I use Hazel to move the tar.gz to an external hard disk once it's finished. This happens every day without me noticing. You can exclude folders if you want to. You probably want to exclude giant cache folders.

You should have a similar script.

@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];