Skip to content

Instantly share code, notes, and snippets.

View gunlinux's full-sized avatar

gunlinux gunlinux

View GitHub Profile
@gunlinux
gunlinux / slow.py
Created December 21, 2017 02:25 — forked from gugu/slow.py
# Возвращаем элементы первого массива, которые есть во втором
import random
import time
def intersection_with_loops(first_array, second_array):
result = []
for first_element in first_array:
if first_element in second_array:
result.append(first_element)
return result
alias "+jumpthrow" "+jump;-attack"
alias "-jumpthrow" "-jump"
bind mouse5 +jumpthrow
alias "+radar" "+use; cl_radar_always_centered 0; cl_radar_scale 0.35; r_cleardecals";
alias "-radar" "-use; cl_radar_always_centered 1; cl_radar_scale 0.5; r_cleardecals";
bind e +radar;
adsp_debug "0"
cl_debugrumble "0"
cl_detail_avoid_force "0"
cl_detail_avoid_radius "0"
cl_detail_avoid_recover_speed "0"
cl_detail_max_sway "0"
cl_forcepreload "1"
cl_rumblescale "0"
cl_showpluginmessages "0"
@gunlinux
gunlinux / git empty folder
Created June 17, 2016 16:09
.gitignore for empty git folder
# Игнорируем всё в этой директории
*
# Кроме самого файла .gitignore
!.gitignore
var play_visible_video = function () {
$('.background-video').each(function () {
var video = $(this);
var view = $(window);
var viewTop = view.scrollTop();
var viewBottom = viewTop + view.height();
var videoTop = video.offset().top;
var notify = require('gulp-notify');
function log() {
var args = Array.prototype.slice.call(arguments);
// Send error to notification center with gulp-notify
notify.onError({
title: 'Compile Error',
message: '<%= error %>'
}).apply(this, args);
@gunlinux
gunlinux / gist:b6f156bc1ddd76e4e2f7
Created July 2, 2015 12:49
Simple flask-script snippet for stat
import os
from app import create_app, db
from flask_script import Manager, Shell
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
manager = Manager(app)
@manager.command
def stat():