Skip to content

Instantly share code, notes, and snippets.

View aklkv's full-sized avatar
:shipit:
Focusing

Alexey Kulakov aklkv

:shipit:
Focusing
View GitHub Profile
@xero
xero / semantic-commit-messages.md
Last active August 21, 2023 12:58
bb commit style guide :: how we liven up the commit history

semantic commit messages

see how a minor change to your commit message style can make you a better programmer self generate {docs,changelog}, add context to the changeset, enable filtering (e.g. ignore styling or documentation changes), and liven up the commit history!

format: <type>(<scope>): <ticket> subject :emoji:

  • <scope>
    • optional
    • some changes are global or difficult to assign to a single component
  • ``
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active April 12, 2024 08:49
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5:
@sarupbanskota
sarupbanskota / README.md
Last active June 9, 2020 21:28
Ember + ESLint + Prettier + Ember Suave
  • new ember app & yarn install
  • ember install ember-cli-eslint@4
// ember-cli-build.js
let app = new EmberApp(defaults, {
  eslint: {
    testGenerator: 'qunit',
    group: true,
    rulesDir: 'eslint-rules',
 extensions: ['js'],
@slavafomin
slavafomin / nodejs-custom-es6-errors.md
Last active March 9, 2024 12:03
Custom ES6 errors in Node.js

Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.

I've tried to make it as lean and unobtrusive as possible.

Defining our own base class for errors

errors/AppError.js

@BretFisher
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@vkostyukov
vkostyukov / statuses.md
Last active June 13, 2024 16:30
HTTP status codes used by world-famous APIs
API Status Codes
[Twitter][tw] 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504
[Stripe][stripe] 200, 400, 401, 402, 404, 429, 500, 502, 503, 504
[Github][gh] 200, 400, 422, 301, 302, 304, 307, 401, 403
[Pagerduty][pd] 200, 201, 204, 400, 401, 403, 404, 408, 500
[NewRelic Plugins][nr] 200, 400, 403, 404, 405, 413, 500, 502, 503, 503
[Etsy][etsy] 200, 201, 400, 403, 404, 500, 503
[Dropbox][db] 200, 400, 401, 403, 404, 405, 429, 503, 507
@ijin
ijin / processGitHubHook.js
Created August 11, 2015 17:51
aws lambda function to process github hook from sns, add user to team, and notify by slack.
var aws = require('aws-sdk');
var kms = new aws.KMS({ region: 'us-east-1' });
var lambda = new aws.Lambda({region: 'ap-northeast-1'});
var encrypted_token = 'CiD0R0tv46w7LNpO0GlZpLfZk2O0Oy66IF83rG6olDY7yBKwAQEBAgB49EdL\nb+OsOyzaTtBpWaS32ZNjtDsuuiBfN6xuqJQ2O8gAAACHMIGEBgkqhkiG9w0B\nBwagdzB1AgEAMHAGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMsDOYHRzB\nN/5q/XCTAgEQgEOnHbGFykvpf06OQ1uQG9P5VjooLu8oSynMp9Cqt5SvaPUC\nKpHkPnnew8nKYhDIcxyLYd/A3vYsHZGWZ3FwN7kx0tIx\n';
var team_id = 1234567;
var valid_comment = 'join';
//console.log('Loading function');
exports.handler = function(event, context) {
@vgeshel
vgeshel / function.js
Last active February 9, 2022 09:19
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@natelandau
natelandau / .bash_profile
Last active June 13, 2024 18:01
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management