Skip to content

Instantly share code, notes, and snippets.

View dyp2000's full-sized avatar
🏠
Working from home

Dennis Y. Parygin dyp2000

🏠
Working from home
  • RUSSIA, Yekaterinburg
View GitHub Profile
@dyp2000
dyp2000 / bag-test.js
Created November 20, 2013 15:13
two files
'use strict';
var bag = new window.Bag({
namespace: 'myNS',
stores: ['localstore']
});
//bag.clear(false);
//throw -1;
@dyp2000
dyp2000 / gist:7654476
Created November 26, 2013 07:11
Ревизия API
на данный момент обнаружил, что нет только цепочек (chains) вызовов
остальное вроде нормально
# Client part
//
// !Columns
//
var xrep_Columns = new Ext.grid.ColumnModel({
defaults: {
sortable: false
},
columns: [{
@dyp2000
dyp2000 / uniqid.js
Created June 19, 2018 06:51 — forked from ain/uniqid.js
JavaScript alternative of PHP uniqid()
function uniqid (prefix, more_entropy) {
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + revised by: Kankrelune (http://www.webfaktory.info/)
// % note 1: Uses an internal counter (in php_js global) to avoid collision
// * example 1: uniqid();
// * returns 1: 'a30285b160c14'
// * example 2: uniqid('foo');
// * returns 2: 'fooa30285b1cd361'
// * example 3: uniqid('bar', true);
// * returns 3: 'bara20285b23dfd1.31879087'
@dyp2000
dyp2000 / mysql-backup
Created February 5, 2020 06:29
Резервное копирование MySQL баз данных. Универсальный скрипт.
#!/bin/bash
echo "Резервное копирование БД mySQL. Версия 1.0 (20201229)"
echo "Автор: Денис Парыгин (dyp2000@mail.ru)"
echo ""
read -p "Укажите путь к архиву: " dest
read -p "Имя базы данных: " database
read -p "Имя пользователя для БД $database: " user
read -sp 'Пароль: ' password
#!/usr/bin/env bash
echo -n -e "\033]0;Homebrew Update...\007"
brew -v update
echo "Press any key to continue..."
read -k1 -s
echo "Upgrading..."
brew -v upgrade
echo "Press any key to continue..."
@dyp2000
dyp2000 / 2019-https-localhost.md
Created September 26, 2022 11:10 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).