Skip to content

Instantly share code, notes, and snippets.

View dmitry-saritasa's full-sized avatar

Dmitry Semenov dmitry-saritasa

View GitHub Profile
Traceback (most recent call last):
File "F:/_Projects/crossingguard_api2/development/_tmp/test.py", line 36, in <module>
s.save()
File "F:\_Projects\crossingguard_api2\development\models\school.py", line 481, in save
return super(Shift, self).save(*args, **kwargs)
File "F:\_Projects\crossingguard_api2\development\mongoengine\document.py", line 377, in save
signals.post_save.send(self.__class__, document=self, created=created)
File "C:\Programming\Python278\virtual\NeetCity\lib\site-packages\blinker\base.py", line 267, in send
for receiver in self.receivers_for(sender)]
File "F:\_Projects\crossingguard_api2\development\mongoengine\fields.py", line 1047, in on_document_pre_save
@dmitry-saritasa
dmitry-saritasa / gist:f74172066beab2134ac0
Created October 8, 2015 22:10
wrong registration api response
{
"detail": "Unfortunately, there are some problems with the data you committed",
"data": {
"username": [
"This username is already being used, pls select another one"
],
"email": [
"This email is already being used. You can reset your password using password reset functionality"
]
}
/*
* NOTE:
* - The use of browser-specific styles (-moz-, -webkit-) should be avoided.
* If used, they may not render correctly for people reading the email in
* a different browser than the one from which the email was sent.
* - The use of state-dependent styles (like a:hover) don't work because they
* don't match at the time the styles are made explicit. (In email, styles
* must be explicitly applied to all elements -- stylesheets get stripped.)
*/
@dmitry-saritasa
dmitry-saritasa / python-settings.el
Created September 27, 2016 01:57
python-settings.el
;;; package --- Python Programming ;;;
;;; Commentary:
;;; Code:
; don't show the startup screen
(setq inhibit-startup-screen t)
; don't show the menu bar
(menu-bar-mode nil)
var person = {
age: 0,
sex: "M",
year: 2015,
sibling: undefined,
married: false,
details: function() {
console.log(this.age, this.sex, this.year);
},
var person = {
age: 0,
sex: "M",
year: 2015,
sibling: undefined,
married: false,
details: function() {
console.log(this.age, this.sex, this.year);
},
@dmitry-saritasa
dmitry-saritasa / .hyper.js
Created February 15, 2017 23:47
~/.hyper.js
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 18,
// font family with optional fallbacks
fontFamily: 'Hack, Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@dmitry-saritasa
dmitry-saritasa / supervisord.service
Created March 31, 2017 18:06
supervisord.service
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisor.d/supervisord.conf
ExecReload=/usr/bin/supervisorctl reload
ExecStop=/usr/bin/supervisorctl shutdown
# The following lines were added by compinstall
export TERM="xterm-256color"
zstyle :compinstall filename '/home/dmitry/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
# VIM replacement with CLIPBOARD support
alias rm='rm -i'
alias rm~='find . -iname "*~" -type f | xargs rm -f'
alias cp='cp -i'
alias mv='mv -i'
alias of='xdg-open .'
alias dropbox='~/.dropbox-dist/dropboxd'
alias nas='sudo mount -t cifs -o rw,user=admin //192.168.0.49/Volume_1/ /mnt/nas'