Skip to content

Instantly share code, notes, and snippets.

"use strict";
const clean = require('gulp-clean');
const gulp = require('gulp');
const stylus = require('gulp-stylus');
const uglify = require('gulp-uglify');
const concat = require('gulp-concat');
const imageop = require('gulp-image-optimization');
const server = require('gulp-express');
@Arfey
Arfey / vagrant.txt
Last active April 12, 2016 08:53
vagrant
config.vm.network :forwarded_port, guest: 8000, host: 8000, auto_correct: true
#!/usr/bin/env bash
# default update
sudo apt-get update
#!/usr/bin/env bash
# default update
sudo apt-get update
# locals
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
$elem.on('mousewheel', function (e, delta) {
// Restricts mouse scrolling to the scrolling range of this element.
if (
this.scrollTop < 1 && delta > 0 ||
(this.clientHeight + this.scrollTop) === this.scrollHeight && delta < 0
) {
e.preventDefault();
}
});
http://djbook.ru/examples/62/
http://agiliq.com/blog/2014/05/supervisor-with-django-and-gunicorn/
http://supervisord.org/installing.html
@Arfey
Arfey / form.md
Last active August 28, 2016 16:41

Відправка форм за допомогою django і jQuery.ajax


Відправлення простої форми

index.html

// Продивитися
https://www.youtube.com/watch?v=Ltmh0ybH1cI
// serialize познайомитися
http://ruseller.com/jquery.php?id=8
http://ruseller.com/jquery.php?id=9
// submit познайомитися із структурою
from django.db import models
from datetime import datetime
class Chat(models.Model):
notify_lecturer = models.BooleanField(default=True)
group = models.OneToOneField('user.Group', on_delete=models.CASCADE)
is_active = models.BooleanField(default=True)
def __str__(self):
@Arfey
Arfey / font.js
Last active September 27, 2016 16:04
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Document</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://necolas.github.io/normalize.css/4.1.1/normalize.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&subset=cyrillic" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,700&subset=cyrillic" rel="stylesheet">
@Arfey
Arfey / init.sh
Last active October 26, 2016 12:01
#!/bin/bash
if [ $1 ]
then
NAME=$1
else
NAME=$(date +"%d%m%y")
fi
git clone https://github.com/Arfey/start.git $NAME