Skip to content

Instantly share code, notes, and snippets.

View sseletskyy's full-sized avatar
🍊
FP mood

Sergiy Seletskyy sseletskyy

🍊
FP mood
View GitHub Profile
# Deploy and rollback script for Heroku on staging and/or production
# Modified from: https://gist.github.com/njvitto/362873
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
desc 'Deploy to Staging on Heroku'
task :staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
desc 'Deploy to Production on Heroku'
@staltz
staltz / introrx.md
Last active April 10, 2025 06:43
The introduction to Reactive Programming you've been missing
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@eirikb
eirikb / JSPM+AVA.md
Last active June 11, 2017 21:30
JSPM + AVA
  1. Download zip.
  2. npm install.
  3. npm test.
// Boolean logic
const tru = (t, f) => t()
const fals = (t, f) => f()
const not = x => (t, f) => x(f, t)
const and = (a, b) => (t, f) => a(
() => b(t, f),
() => f()
)
@klement97
klement97 / error.handler.ts
Last active January 24, 2025 12:11
A central solution to error handling in Angular Reactive Forms
import {AbstractControl, FormArray, FormControl, FormGroup, ValidationErrors} from '@angular/forms';
import {Injectable} from '@angular/core';
import {debounceTime, distinctUntilChanged} from 'rxjs/operators';
export declare interface ServerError {
[key: string]: [];
}