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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
| from generate_functions import * |
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
| from .fixtures import * |
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
| def _keyword_fixture(fn): | |
| fixture_name = fn.__name__ | |
| fixture_module = import_module(fn.__module__) | |
| @pytest.fixture(autouse=True) | |
| def _autouse_fixture(request): | |
| if fixture_name in request.keywords: | |
| request.getfuncargvalue(fixture_name) | |
| _autouse_fixture.__name__ = '_{}_autouse'.format(fixture_name) |
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
| Placeholder |
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
| // ==UserScript== | |
| // @name Hive passwords utilities | |
| // @description Copies to clipboard upon Reveal | |
| // @match https://hive.hivelocity.net/admin/passwords/password/* | |
| // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
| // @grant GM_setClipboard | |
| // @copyright 2013, Zach "theY4Kman" Kanzler | |
| // ==/UserScript== | |
| $('input[type=password]').siblings('a').click(function() { |
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
| channels: | |
| - '#sourcemod' | |
| - '#yakbot' | |
| network: | |
| host: irc.gamesurge.net | |
| port: 6667 | |
| nickname: yakbot | |
| plugins: | |
| - smapi | |
| - smbugs |
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
| wget https://gist.github.com/theY4Kman/6197365/raw/setup-yak.sh -O /tmp/setup-yak.sh && source /tmp/setup-yak.sh |
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
| # runserver | |
| from django.core.management.commands import runserver | |
| runserver.BaseRunserverCommand.handle.im_func.func_defaults = ('0.0.0.0:5050',) | |
| # And runserver_plus | |
| from django_extensions.management.commands import runserver_plus | |
| runserver_plus.Command.handle.im_func.func_defaults = ('0.0.0.0:5050',) |
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
| def sql_enum_if(enum_dict, field): | |
| """ | |
| Example: | |
| >>> enum_dict = {'CONST_NAME': 1, 'CONST_TWO': 2} | |
| {'CONST_TWO': 2, 'CONST_NAME': 1} | |
| >>> sql_enum_if(enum_dict, 'myfield') | |
| 'IF(myfield = 2, "CONST_TWO", IF(myfield = 1, "CONST_NAME", "<unknown>")) AS myfield' | |
| """ | |
| def _sql_enum_if(items): |