Skip to content

Instantly share code, notes, and snippets.

View Alek-S's full-sized avatar
😎

Alek Shnayder Alek-S

😎
View GitHub Profile
@Alek-S
Alek-S / Angular-CLI.md
Last active February 26, 2019 18:17
Angular CLI CheatSheet

Generate - Common Flags

  • --flat -> generate in top level of project?
  • --module=[module] -> the declaring module
  • --dry-run -> show files to be created without creating them

Generate Component

ng generate component [name of component]

  • ex (subfolder): ng g c core/footer
    • --style=[css|scss|sass|less|styl]
  • --export -> declaring module will export this component
@Alek-S
Alek-S / vs-code-extentions.md
Last active May 9, 2018 05:36
VS Code JavaScript Extentions
/**
* @file This is my cool script.
* @copyright Alek Shnayder 2018
*/
import React from 'react';
import { ArrowKeyStepper, Grid } from 'react-virtualized';
import styles from '../styles/main.css';
import styled from 'styled-components';
@Alek-S
Alek-S / CSVDownloadExample.js
Last active November 17, 2017 22:59
Send CSV to client of in-memory data, without writing CSV on the server
// will generate CSV from in-memory data
// client will download as CSV without server having to save the file
//requries json2csv from npm
//ref: https://stackoverflow.com/questions/45922074/node-express-js-download-file-from-memory-filename-must-be-a-string
const json2csv = require('json2csv'); //from NPM
const stream = require('stream'); //Native Node
/*
@Alek-S
Alek-S / tmux_commands.md
Last active September 11, 2019 00:22
tmux Commands

Start new named session:

tmux new -s [session name]

Detach from session:

ctrl+b d

List sessions:

tmux ls

Attach to named session:

Keybase proof

I hereby claim:

  • I am alek-s on github.
  • I am alek_s (https://keybase.io/alek_s) on keybase.
  • I have a public key ASDbRcwePlWOyqGkhwFHGfzM5wmt07eLW5qfz_ZG183QJwo

To claim this, I am signing this object:

@Alek-S
Alek-S / server.js
Created May 15, 2017 19:55
Express Server Starter Template
'use strict';
//==MODULES==
const express = require('express');
const bodyParser = require('body-parser');
//==Express Setup==
const app = express();
@Alek-S
Alek-S / .vimrc
Last active April 30, 2017 17:29
.vimrc Config
syntax on
colorscheme monokai
set number
set incsearch
set hlsearch
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup