Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Bogdan insane-dev

🎯
Focusing
View GitHub Profile
@insane-dev
insane-dev / command.sh
Created Sep 22, 2020
Per-repository SSH keys
View command.sh
# If you want to use different keys depending on the repository you are working
# on, you can issue the following command while inside your repository:
git config core.sshCommand "ssh -o IdentitiesOnly=yes -i ~/.ssh/private-key-filename-for-this-repository -F /dev/null"
@insane-dev
insane-dev / tokens.md
Created May 20, 2020 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication
View tokens.md

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 20.04.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@insane-dev
insane-dev / install.sh
Last active Dec 8, 2019
Lemp stack for Ubuntu 16.04 (PHP7, Nginx, MySql, MongoDB, PhpMyAdmin, Git, Node.js, Bower, Gulp, Docker, Composer(with asset plugin), Dnsmasq)
View install.sh
#!/bin/bash
echo "Please, enter your username, it will be added to 'sudo' and 'docker' groups during the process."
read USERNAME
if [ -z "$USERNAME" ] ; then
echo "Exiting... Done."
exit
else
echo "Adding user to 'sudo' group..."
@insane-dev
insane-dev / .bash_aliases
Created Jul 9, 2017
Commonly used bash aliases
View .bash_aliases
#!/bin/bash
# Colors
RED='\033[0;31m'
BLACK='\033[0;30m'
DARK_GRAY='\033[1;30m'
LIGHT_RED='\033[1;31m'
GREEN='\033[0;32m'
LIGHT_GREEN='\033[1;32m'
BROWN_ORANGE='\033[0;33m'
View mysql-timezone-set.cnf
# Populate the Time Zone Tables from your system into the MySQL:
# @see https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html#time-zone-installation
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
# In `/etc/mysql/my.cnf` add following line under [mysqld] config group:
[mysqld]
@insane-dev
insane-dev / makedomain.sh
Last active Apr 1, 2017
Command that creates domain dir and its nginx config
View makedomain.sh
#!/bin/bash
# Makedomain command
# ---
# script can run with the domain as a command line input
# `sudo ./nginx_domain.sh my_domain.com` or without and
# the script will prompt the user for input
#
# BTW: You can make it global e.g. by:
# sudo ln -s /opt/delagics/makedomain.sh /usr/bin/makedomain
@insane-dev
insane-dev / sets.json
Last active Jul 20, 2016 — forked from anonymous/sets.json
Bootstrap 3 Grids. This is guide set data exported by the GuideGuide plugin. To import them, click the "Import" button in the GuideGuide settings and paste this Gist url into the text field.
View sets.json
{"Default":{"name":"Default","sets":{"23fc883b47d57c53d53b4a53e20b387553b08e24":{"name":"1170px bootstrap lg","string":"$v = | ~ | 15px | 15px |\n$t = | 15px\n| 15px | $v*11 | ~ | 15px | ( vcp, ~ | 1170px | ~ )","id":"23fc883b47d57c53d53b4a53e20b387553b08e24"},"67961337777b97d4b4e6ddc7538347b832f6dae5":{"name":"970px bootstrap md","string":"$v = | ~ | 15px | 15px |\n$t = | 15px\n| 15px | $v*11 | ~ | 15px | ( vcp, ~ | 970px | ~ )","id":"67961337777b97d4b4e6ddc7538347b832f6dae5"},"bd520c8c6e3255dc384118c5aa0935d87adac6b9":{"name":"750px bootstrap sm","string":"$v = | ~ | 15px | 15px |\n$t = | 15px\n| 15px | $v*11 | ~ | 15px | ( vcp, ~ | 750px | ~ )","id":"bd520c8c6e3255dc384118c5aa0935d87adac6b9"}}}}
@insane-dev
insane-dev / Gruntfile.js
Last active Jun 14, 2016
bower.json, package.json and perfect starter Gruntfile.js (jade(pug), scss/sass, minifiers, ulifiers, cache busting, bower, image optimization, browser live reload, file concatenating)
View Gruntfile.js
// For performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// If you want to recursively match all sub-folders, use:
// 'test/spec/**/*.js'
'use strict';
module.exports = function (grunt) {
var autoprefixer = require('autoprefixer')({
@insane-dev
insane-dev / removedomain.sh
Created May 5, 2016
Command that removes domain dir and its nginx config
View removedomain.sh
#!/bin/bash
# Removedomain command
# ---
# script can run with the domain as a command line input
# `sudo ./nginx_domain.sh my_domain.com` or without and
# the script will prompt the user for input
#
# BTW: You can make it global e.g. by:
# sudo ln -s /opt/delagics/removedomain.sh /usr/bin/removedomain
View swf-link-banner.html
You can’t perform that action at this time.