Тут все про решениеи проблем с GIT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
s='true,false,null,undefined,0,42,3.14159265359,NaN,Infinity,-Infinity' | |
a=s.split(',') | |
for x in a: | |
b.extend([x, ' \t\n' + x]) | |
if x.upper() != x: | |
b.append(x.upper()) | |
if x.lower() != x: | |
b.append(x.lower()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import re | |
import sys | |
from argparse import ArgumentParser | |
# pip install pyqt5 | |
from PyQt5.QtCore import * | |
from PyQt5.QtWebEngineWidgets import * | |
from PyQt5.QtWidgets import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ошибку, генерируюмую console.assert, перехватить не удастся. | |
class AssertionError extends Error { | |
constructor(message) { | |
super(message) | |
Error.captureStackTrace(this, this.constructor) | |
} | |
} | |
function assert(test, message = 'Assertion failed') { | |
if (!test) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/33106709/chrome-webrequest-doesnt-see-post-data-in-requestbody | |
// https://developer.chrome.com/extensions/webRequest | |
const wsUrl = 'ws://localhost:8192/ws' | |
const requestFilter = { urls: ['<all_urls>'] } | |
const requests = new Map() | |
let ws | |
// -function connect() { | |
// ws = new WebSocket(wsUrl) |
# Сколько включена машина
$ uptime
14:26:14 up 6 days, 23:20, 1 user, load average: 1,18, 1,58, 1,88
# Все запущенные серверы, использующие TCP/IP
$ netstat -lnt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ModelOptions: | |
... | |
class ModelMeta(type): | |
def __new__(mcls, name, bases, attrs): | |
cls = super().__new__(mcls, name, bases, attrs) | |
# if name == 'Model': | |
# return cls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Migration | |
*/ | |
'use strict'; | |
module.exports = { | |
up: function(queryInterface, Sequelize) { | |
return queryInterface.createTable('Users', { | |
firstName: { | |
type: Sequelize.STRING | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import Sequelize from 'sequelize'; | |
import bcrypt from 'bcryptjs'; | |
export default class User extends Sequelize.Model { | |
static init(sequelize) { | |
return super.init({ | |
username: { | |
type: Sequelize.STRING, | |
unique: true, | |
allowNull: false |
OlderNewer