Skip to content

Instantly share code, notes, and snippets.

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@Prezens
Prezens / gist:f99fd28124b5557eb16816229391afee
Created April 2, 2019 07:40
Apache .htaccess settings for Vue, vue-router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
https://router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations
@Prezens
Prezens / Linux append icon in menu
Created March 12, 2019 09:38
Linux append icon in menu
Создаем файл ярлыка pycharm.desktop: gedit ~/.local/share/applications/pycharm.desktop
В файле пишем следующий текст и сохраняем:
[Desktop Entry]
Name=PyCharm
Comment=Среда разработки PyCharm
GenericName=PyCharm
Keywords=PyCharm;Python;Django;IDE;
Exec=/usr/bin/pycharm
Terminal=false
<script type="text/javascript">
var detect = navigator.userAgent.toLowerCase();
if((detect.indexOf('safari')) != -1)
{
document.write('<link href="style/safari.css" rel="stylesheet" type="text/css" />');
}
</script>
@Prezens
Prezens / AllBlocksOnceHeight
Last active August 7, 2016 13:24
All blocks once height.
function setEqualHeight(columns){
var tallestcolumn = 0;
columns.each(function(){
var currentHeight = $(this).height();
if(currentHeight > tallestcolumn){
tallestcolumn = currentHeight;
}
});
columns.height(tallestcolumn);
$(window).load(function() {
$(".circle").fadeOut();
$(".preloader").delay(400).fadeOut("slow");
});
.preloader
width: 100vw
height: 100vh
display: flex
flex-direction: column
justify-content: center
align-items: center
position: fixed
z-index: 9999
.loader
background: none repeat scroll 0 0 #ffffff
bottom: 0
height: 100%
left: 0
position: fixed
right: 0
top: 0
width: 100%
z-index: 9999
$(document).ready(function() {
function heightDetect() {
$(".main-head").css("height", $(window).height()); //Для того, чтобы header занимал всю высоту экрана
};
heightDetect();
$(window).resize(function () {
heightDetect();
});
});