- Ушел из компании мечты (фейл, пришлось), а потом ее купила Airbnb (вин);
- Запустил второй проект на Эрланге в продакшн (трекер общественного транспорта, щас он уже все);
- Для этого проекта на Эрланге сделал красивое приложение для Windows Phone в продакшн (прям качали с магазина);
- Затащил лучшего друга в программирование, всячески ему помогал и сейчас он уже на зарплате;
- Затащил этот проект с трекингом транспорта в дипломную и защитил на отлично, закончил универ;
- Попал в сильную команду рубистов, там немного научили в DDD и поставили на путь, куда идти дальше в ООП;
- Попал в другую сильную команду рубистов, где хорошо прокачал теорию и практику распределенных систем;
- Возненавидел тех, кто использует Elasticsearch не по назначению (никогда в жизни не устану это повторять, это травма);
- Прокачался во фронтенде (react, babel и все такое модное с БД на клиенте и иммутабельными стейтами);
- Попал в команду ROM, написал два адаптера в продакшн (rom-elasticsearch, rom-redis) и один для себя (rom-rethin
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
#! /usr/bin/env node | |
'use strict'; | |
const program = require('commander'); | |
const fs = require('fs'); | |
const { spawn } = require('child_process'); | |
program | |
.version('1.0.0') | |
.option('-e, --environment <environment>', 'Environment to deploy to') |
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
// https://github.com/kolodny/immutability-helper | |
/** Declaration extension point */ | |
declare namespace ImmutabilityHelper { | |
interface CustomOperators<T> { | |
/* $someShit?: T */ | |
/* $moreShit?: T */ | |
} | |
} |
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
All of these resources were extremely valuable as I researched regex, finite state machines, and regex in Ruby. Check them out, they're full of fantastic information! | |
Articles | |
"Exploring Ruby's Regular Expression Algorithm" by Pat Shaughnessy | |
http://patshaughnessy.net/2012/4/3/exploring-rubys-regular-expression-algorithm | |
"Finite State Machines and Regular Expressions" by Eli Bendersky | |
http://www.gamedev.net/page/resources/_/technical/general-programming/finite-state-machines-and-regular-expressions-r3176 | |
"Regular Expression Matching Can Be Simple and Fast" by Russ Cox |
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
(function () { | |
var | |
documentElement = document.documentElement, | |
viewportFontSize, viewportHeight, viewportIsPortrait, viewportMax, viewportMin, viewportWidth; | |
function getViewportFontSize() { | |
var | |
body = documentElement.appendChild(document.createElement('body')), | |
iframe = document.createElement('iframe'), | |
iframeDocument; |
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
(function ($, document, undefined) { | |
$.extend({ | |
/** | |
* A static jQuery-method. | |
* @param {number} x The x-coordinate of the Point. | |
* @param {number} y The y-coordinate of the Point. | |
* @param {Element} until (optional) The element at which traversing should stop. Default is document.body | |
* @return {jQuery} A set of all elements visible at the given point. | |
*/ | |
elementsFromPoint: function(x,y, until) { |
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
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
add_header 'Access-Control-Allow-Credentials' 'true'; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS, HEAD'; | |
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; | |
add_header 'Access-Control-Max-Age' 1728000; | |
add_header 'Content-Type' 'text/plain charset=UTF-8'; | |
add_header 'Content-Length' 0; | |
return 204; | |
} |
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
/** Async version of Array.prototype.reduce() | |
* await reduce(['/foo', '/bar', '/baz'], async (acc, v) => { | |
* acc[v] = await (await fetch(v)).json(); | |
* return acc; | |
* }, {}); | |
*/ | |
export async function reduce(arr, fn, val, pure) { | |
for (let i=0; i<arr.length; i++) { | |
let v = await fn(val, arr[i], i, arr); | |
if (pure!==false) val = v; |
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
// How to ensure that our animation loop ends on component unount | |
componentDidMount() { | |
this.startLoop(); | |
} | |
componentWillUnmount() { | |
this.stopLoop(); | |
} |
In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.
- Create new server
- Login to new server
- ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
- accept the RSA key
OlderNewer