This file contains 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 Hulu fill search input from query params | |
// @namespace https://y4kstudios.com | |
// @updateUrl https://gist.github.com/theY4Kman/6e3680fdd5383992aeee5f3f4312dd8d/raw/e6d247c5e60d3411408f59faa82cdd833b84dac4/hulu-chrome-omnibox-search-fix.tamper.js | |
// @version 0.1 | |
// @description There seems no way to search Hulu from the Chrome omnibox, because it no longer fills the search bar using the `?q=query` param. This script resolves that issue. | |
// @author You | |
// @match https://www.hulu.com/search?* | |
// @grant none | |
// ==/UserScript== |
This file contains 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 Linkify beanstalk instances | |
// @namespace https://perchsecurity.com | |
// @updateURL https://gist.githubusercontent.com/theY4Kman/9938a82b2176aa4ef3fb38fec564500c/raw/beanstalk-instance-linker.tamper.js | |
// @version 1.0 | |
// @description Link instance IDs to EC2 console in Beanstalk | |
// @author theY4Kman | |
// @match https://console.aws.amazon.com/elasticbeanstalk/* | |
// @match https://*.console.aws.amazon.com/elasticbeanstalk/* | |
// @grant none |
Below are a list of the available Slack commands for Jukebot.
Command | Description |
---|---|
/add track name | Add a song to your Jukebot playlist |
/album album name | Search for an album |
/artist artist name | Search for an artist |
/current playlist | track |
/delete | Delete the currently playing track from your Jukebot playlist |
/find track name | Search for a track to add to your Jukebot playlist |
This file contains 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
""" | |
In pytest.ini, we configure python_classes with wildcard patterns that are | |
checked with fnmatch. This can produce some unintentional effects; for instance, | |
the pattern For* also matches ForbidsAnonymousUsers, which we don't wish. | |
This plugin extends the semantics of fnmatch for python_classes, so a dash '-' | |
in the pattern matches a CamelWords boundary. | |
- For* will match "ForbidsAnonymousUsers" as well as "ForCurrentUser" | |
- For-* will match "ForCurrentUser", but not "ForbidsAnonymousUsers" |
This file contains 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
import logging | |
from contextlib import contextmanager | |
from django.db import transaction | |
from django.http import HttpRequest | |
from django.utils.deprecation import MiddlewareMixin | |
logger = logging.getLogger(__name__) | |
This file contains 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 django.db.models import Subquery | |
class SubquerySelect(Subquery): | |
"""Return only a subset of fields from a Subquery""" | |
template = '(SELECT %(fields)s FROM (%(subquery)s) AS %(subquery_alias)s)' | |
def __init__(self, queryset, output_field=None, fields=('*',), **extra): | |
self.fields = tuple(fields) |
This file contains 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 django.contrib.postgres.fields import ArrayField | |
from django.db.models import Expression, Value | |
from netfields import InetAddressField | |
class Array(Expression): | |
"""A Postgres ARRAY[] expression""" | |
def __init__(self, *items, output_field=None): | |
if output_field is None: |
This file contains 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
import pytest | |
def RecordResponse(title=None): | |
import pytest | |
class RecordResponse: | |
@pytest.mark.record_response(title=title) | |
def it_records_response(self): | |
pass |
This file contains 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
# XXX###################################################################################### | |
# XXX###################################################################################### | |
import os | |
import linecache | |
import sys | |
import time | |
from trace import Trace | |