Skip to content

Instantly share code, notes, and snippets.

View 2bj's full-sized avatar
🏠
Working from home

Bakyt 2bj

🏠
Working from home
View GitHub Profile

Источник

Вопрос о DDD:

Я пытаюсь учиться DDD, но я очень запутался в некоторых терминах, которые используются для описания некоторых вещей, они заставляют мой маленький мозг жариться как маленькое яйцо.

  • Что такое логика домена, слой домена, бизнес-логика, бизнес-слой, модель домена, объект домена, событие домена, эксперт по доменам, ядро домена?
  • Как обнаружить всё это в моём коде?
  • Laravel сделан над этими DDD понятиями? (я часто вижу такие вещи как сервисы, репозитории и др)
  • Где я могу научиться DDD очень простым способом? (Я имею ввиду реально очень простым способом)
@2bj
2bj / county_district.sql
Created March 7, 2012 13:23
База огругов с районами москвы
CREATE TABLE IF NOT EXISTS `county` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(124) NOT NULL,
`short_name` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
INSERT INTO `county` (`id`, `name`, `short_name`) VALUES
@2bj
2bj / wget.txt
Created July 2, 2020 10:36 — forked from iAugur/wget.txt
wget spider cache warmer
wget --spider -o wget.log -e robots=off -r -l 5 -p -S -T3 --header="X-Bypass-Cache: 1" -H --domains=live-mysite.mydomain.com --show-progress live-mysite.mydomain.com
# Options explained
# --spider: Crawl the site
# -o wget.log: Keep the log
# -e robots=off: Ignore robots.txt
# -r: specify recursive download
# -l 5: Depth to search. I.e 1 means 'crawl the homepages'.  2 means 'crawl the homepage and all pages it links to'...
# -p: get all images, etc. needed to display HTML page
# -S: print server response (to the log)
@2bj
2bj / History_19921103-hypertexthypertext_WWW_TheProject.html
Created August 8, 2012 07:46
The website of the world's first-ever web server
<HEADER>
<TITLE>The World Wide Web project</TITLE>
<NEXTID N="55">
</HEADER>
<BODY>
<H1>World Wide Web</H1>The WorldWideWeb (W3) is a wide-area<A
NAME=0 HREF="WhatIs.html">
hypermedia</A> information retrieval
initiative aiming to give universal
access to a large universe of documents.<P>
@2bj
2bj / homebrew-permissions.sh
Created February 17, 2019 22:03 — forked from jrenggli/homebrew-permissions.sh
Fix homebrew permissions
sudo chown -R $(whoami) /usr/local/Cellar
sudo chown -R $(whoami) /usr/local/Homebrew
sudo chown -R $(whoami) /usr/local/var/homebrew
sudo chown -R $(whoami) ${HOME}/Library/Caches/Homebrew
sudo chown -R $(whoami) ${HOME}/Library/Logs/Homebrew
sudo chown -R $(whoami) /usr/local/etc
sudo chown -R $(whoami) /usr/local/opt
sudo chown -R $(whoami) /usr/local/bin
sudo chown -R $(whoami) /usr/local/var
sudo chown -R $(whoami) /usr/local/share/man/man1
@2bj
2bj / how-to-set-up-stress-free-ssl-on-os-x.md
Created January 28, 2019 14:24 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@2bj
2bj / db-open
Created March 26, 2016 00:06 — forked from helderco/db-open
Script to open a mysql database in Sequel Pro from a service in docker-compose.
#!/bin/bash
set -e
show_help() {
cat << EOF
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE]
${0##*/} -h
Open a standard connection in Sequel PRO.

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version

brew install mysql

@2bj
2bj / metro.sql
Created October 10, 2017 13:18 — forked from anonymous/metro.sql
Таблица станций московского метро
-- phpMyAdmin SQL Dump
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@2bj
2bj / railscasts_grabber.py
Created July 11, 2009 20:44
get railscasts videos links from http://railscasts.com
#!/usr/bin/env python
import urllib
import re
import os
# @author 2bj (gml2bj gmail)
# @target чиста для себя ;) ну и учу питон
class railcasts_grabber: