This file contains hidden or 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
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"path": "/home/wowkalucky/dev/asnportal_project/_asnportal/", | |
"folder_exclude_patterns": ["venv","run"] | |
} | |
] | |
} |
This file contains hidden or 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
$.extend($.expr[':'], { | |
over100pixels: function(a) { | |
return $(a).height() > 100; | |
} | |
}); | |
$('.box:over100pixels').click(function() { | |
alert('Элемент, который вы потревожили своим кликом, в высоту более 100 пикселов'); | |
}); |
This file contains hidden or 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
switch(n) | |
{ | |
case 1: | |
execute code block 1 | |
break; | |
case 2: | |
execute code block 2 | |
break; | |
default: | |
code to be executed if n is different from case 1 and 2 |
This file contains hidden or 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
$.customMethod = function(){ | |
return $.ajax({ | |
url: '/targetUrl/', | |
// data: {param1: 'value1'}, | |
dataType: 'jsonp', | |
}).promise(); | |
}; | |
var outer = $.customMethod(); |
This file contains hidden or 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
# file rule | |
#---------------- | |
* text=auto | |
*.rb text | |
*.js text | |
*.bat text eol=crlf | |
*.sh text eol=lf | |
*.png binary |
This file contains hidden or 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
<!-- via control upload --> | |
<input type="file" id="your-files" multiple> | |
<script> | |
var control = document.getElementById("your-files"); | |
control.addEventListener("change", function(event) { | |
// When the control has changed, there are new files | |
var i = 0, | |
files = control.files, |
This file contains hidden or 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history | |
export HISTCONTROL=ignoreboth:erasedups | |
# set history length |
This file contains hidden or 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
# ######################################################################### | |
# This bash script adds tab-completion feature to django-admin.py and | |
# manage.py. | |
# | |
# Testing it out without installing | |
# ================================= | |
# | |
# To test out the completion without "installing" this, just run this file | |
# directly, like so: | |
# |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import time | |
reps = 1000 | |
repslist = range(reps) |
This file contains hidden or 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 object creation methods | |
""" | |
class Meta(type): | |
pass | |
# 1) via definition: |