Skip to content

Instantly share code, notes, and snippets.

View timchenkomo's full-sized avatar

Timchenko Mikhail timchenkomo

  • ASCON
  • Kolomna, Moscow Oblast, Russia
View GitHub Profile
@timchenkomo
timchenkomo / Program.cs
Created August 30, 2018 10:13 — forked from DanielSWolf/Program.cs
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@timchenkomo
timchenkomo / pg_show_grants.sql
Created March 28, 2019 09:29 — forked from winebarrel/pg_show_grants.sql
show grants for PostgreSQL
select
pg_user.usename,
t1.nspname,
t1.relname,
relacl.privilege_type,
relacl.is_grantable
from (
select
pg_namespace.nspname,
pg_class.relname,
@timchenkomo
timchenkomo / OracleConnect.md
Created January 17, 2020 14:47 — forked from rdnvndr/OracleConnect.md
Oracle database connection

Oracle database connection

┌──────────────┬────────────────────────────────────────────────┐
│  clienthost  │                                                │
├──────────────┘                                                │
│   $ sqlplus username/password@ORCL                            │
│                                │                              │
│                                ├ Naming method                │
│   ┌────────────────────────────┴───────────────────┐          │
│   │ FILE: $ORACLE_HOME/network/admin/sqlnet.ora    │          │ 
@timchenkomo
timchenkomo / fix-git-line-endings
Created November 5, 2020 03:32 — forked from ajdruff/fix-git-line-endings
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@timchenkomo
timchenkomo / .gitignore
Created November 14, 2020 10:49 — forked from salcode/.gitignore
.gitignore file for a general web project - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20181206
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# to download this file
#
@timchenkomo
timchenkomo / meritt.zsh-theme
Created November 29, 2020 09:28 — forked from meritt/meritt.zsh-theme
My ZSH theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# Based on Agnoster's Theme — https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts)
# [Solarized theme](https://github.com/altercation/solarized/)
# [iTerm 2](http://www.iterm2.com/)
### Segment drawing
@timchenkomo
timchenkomo / pug.md
Created December 20, 2020 09:42 — forked from neretin-trike/pug.md
Туториал по HTML препроцессору Pug (Jade)
@timchenkomo
timchenkomo / index.html
Created January 5, 2021 16:07
Timeline CSS with Counters
<div>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi corporis id eius corrupti temporibus velit? Molestias harum voluptatibus veritatis explicabo ut velit deserunt, saepe sit commodi?</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi corporis id eius corrupti temporibus velit? Molestias harum voluptatibus veritatis explicabo ut velit deserunt, saepe sit commodi?</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi corporis id eius corrupti temporibus velit? Molestias harum voluptatibus veritatis explicabo ut velit deserunt, saepe sit commodi?</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi corporis id eius corrupti temporibus velit? Molestias harum voluptatibus veritatis explicabo ut velit deserunt, saepe sit commodi?</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, iste iusto quas eligendi c

Starting Postgresql in Windows without Install

Problem

This is a question that comes up quite often by windows users, so thought we would share how we normally do it. The question is

Can you run a PostgreSQL server on your windows desktop/server box without having to install anything?

The answer is

@timchenkomo
timchenkomo / README.md
Created January 20, 2022 10:15 — forked from quinnjr/README.md
How to easily add environment variables to an Angular application

How to easily add environment variables to an Angular application

This guide assumes that you already have an angular application set up by ng create and are using Angular CLI for compilation.

Other guides that I've read rely upon re-writing your environments/environment.ts|environment.prod.ts files with each compilation. I find this to be completely unnecessary when angular's internal use of webpack can just be extended to include environment variables.

1. Add @angular-builders/custom-webpack to your dev-dependencies