Skip to content

Instantly share code, notes, and snippets.

@martdn
martdn / bash
Created March 31, 2020 16:57
How to save username and password in git?
git config --global credential.helper store
git pull and git ls-remote http://REPO
@martdn
martdn / component.js
Last active February 12, 2020 07:16
Interactor
export default {
async created() {
try {
this.isLoading = true;
this.userLocation = await this.checkoutRepo.getUserLocation();
const getOrderInteraction = new GetOrderInteractor(this.checkoutRepo, {
apiRouter: this.$router,
route: this.$route
});
@martdn
martdn / Dockerfile
Created January 22, 2020 13:06
Docker
FROM node:12.14.1
RUN apt-get update; \
apt-get install -y --no-install-recommends mysql-client; \
apt-get clean;
@martdn
martdn / frontend-structure.md
Last active November 22, 2019 06:26
Frontend folder-structure
|-- frontend
|   |-- src
|   |   |-- assets
|   |   |   |-- images
|   |   |   |-- fonts
|   |   |   '-- svg
|   |   |-- components
|   |   |   '-- App...
| | |-- shared
@martdn
martdn / README.md
Last active November 18, 2019 05:42
[Homebrew] Nginx configuration for Mac
  brew install nginx
  ln -sfv /usr/local/opt/nginx/*.plist ~/Library/LaunchAgents
  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist
  • mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
  • cd /usr/local/etc/nginx/sites-enabled
  • ln -s ../sites-available/default.conf
@martdn
martdn / readmi.md
Last active October 23, 2019 07:32
Sprint11. Rework order backend

Description

Если коротко

Была создана новая структура для хранения заказа, соответственно под неё были переарботаны фронтенд и бэкенд. На фронте были переписаны на vue страницы создания заказа и список заказов пользователя.

Подробнее

sudo apt-get update
sudo apt-get install zsh
chsh -s /bin/zsh
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
nano ~/.zshrc
ZSH_THEME="ys"
plugins=(git composer symfony2 colorize docker docker-compose gem brew npm node ruby)
upstream app_dashboard {
server 127.0.0.1:3000;
keepalive 8;
}
# the nginx server instance
server {
listen 80;
listen [::]:80;
# server_name domain.com www.domain.com;
const path = require('path');
const webpack = require('webpack');
const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
entry: {
main: './src/features/main/index.js',
@martdn
martdn / getsburned.sol
Last active July 16, 2018 09:52
Destruction smart-contract. Код контракта удалится из блокчейна, и им нельзя никак воспользоваться.
pragma solidity ^0.4.18;
contract GetsBurned {
function BurnMe () public {
// Selfdestruct and send eth to self,
selfdestruct(address(this));
}
}