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
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 18, 2024 11:00
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@staltz
staltz / introrx.md
Last active May 18, 2024 05:17
The introduction to Reactive Programming you've been missing
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=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')
@klement97
klement97 / error.handler.ts
Last active June 26, 2023 12:16
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]: [];
}
@piranha
piranha / пше
Last active March 25, 2023 07:41
пше гит, прошу пана
#!/usr/bin/env python
# -*- mode: python, coding: utf-8 -*-
#
# This incredible piece of code makes git a bit Polish, a bit Western Ukrainian,
# пше прошу пана
# Joke is based on fact that 'git' is 'пше' in qwerty/йцукен layouts
#
# (c) 2013 Alexander Solovyov under terms of WTFPL
import sys
@njvitto
njvitto / deploy.rake
Created April 11, 2010 16:56 — forked from RSpace/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app
#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]
@warnergodfrey
warnergodfrey / Gemfile
Last active December 14, 2017 01:10
Instructions for running remote JMeter
source 'https://rubygems.org'
gem 'ruby-jmeter', github: 'lukeck/ruby-jmeter'
@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()
)
@matthewrobertson
matthewrobertson / base_serializer.rb
Last active June 14, 2016 07:16
A simple pattern for creating classes that encapsulate JSON serialization logic. Simply inherit from the `BaseSerializer` and override the hook methods as necessary.
# An abstract base class used to create simple serializers
# for ActiveRecord objects
class BaseSerializer
include Rails.application.routes.url_helpers
attr_reader :serialized_object
def initialize(serialized_object)
@serialized_object = serialized_object
end