Skip to content

Instantly share code, notes, and snippets.

View blueyed's full-sized avatar
💭
❤️ not eating nor abusing animals 🍀

Daniel Hahler blueyed

💭
❤️ not eating nor abusing animals 🍀
View GitHub Profile
client.connect_signal("manage", function (c)
-- Enable sloppy focus
local sloppy_focus_last_coords = mouse.coords()
c:connect_signal("mouse::enter", function(c)
-- bnote("mouse::enter::focus", 2)
local coords = mouse.coords()
local last = sloppy_focus_last_coords
-- bnote("coords: " .. coords.x .. "/" .. coords.y )
-- bnote("last : " .. last.x .. "/" .. last.y )
if coords.x == last.x and coords.y == last.y then
--- Put a client relatively on the screen's workarea (sets floating state).
-- @param c A client.
-- @param x X position multipler (0.5 for center).
-- @param y Y position multiplier (0.5 for center).
-- @param width Width multiplier.
-- @param width Height multiplier.
local put_client = function(c, x, y, width, height)
local wa = capi.screen[c.screen].workarea
local geo = {
local ewmh = require("awful.ewmh")
client.disconnect_signal("request::activate", awful.ewmh.activate)
client.connect_signal("request::activate", function(c)
if not c:isvisible() then
-- Meant to handle opening a link from somewhere.
-- Causes Firefox to steal the focus on other events though!
-- Would need some magic flag being set via open-in-running-browser.
-- if c.class == "Firefox" and c.type == "normal" then
-- awful.client.jumpto(c)
-- -- awful.tag.viewonly(c:tags()[1])
-- Opacity handling.
local M = {}
M = {
opacity_unfocused_screen = 0.98,
opacity_unfocused_screen_last_client = 1,
}
local locked_opacity = {}
local capi = {
client = client,
-- Standard awesome library
local gears = require("gears")
local _dbus = dbus; dbus = nil
local naughty = require("naughty") -- XXX: if loaded (with dbus available), notifications do not go to dunst/notify-osd anymore
dbus = _dbus
-- Debug function. Set focusstyle.debug to activate it. {{{2
local gears = require("gears")
local bdebug_level = 10 -- display all
-- Autohide tags with no clients. {{{
-- Based on eminent (https://github.com/guotsuan/eminent), without monkey-patching viewidx.
local function autohidetags(screen)
for k, t in ipairs(awful.tag.gettags(screen)) do
if t.selected or #t:clients() > 0 then
awful.tag.setproperty(t, "hide", false)
else
awful.tag.setproperty(t, "hide", true)
end
end
--- django/django/contrib/admin/templates/admin/base_site.html 2014-05-15 01:20:54.977099539 +0200
+++ virtualenv/src/autocomplete-light/autocomplete_light/templates/admin/base_site.html 2014-04-30 16:10:30.881101635 +0200
@@ -1,10 +1,9 @@
{% extends "admin/base.html" %}
-{% load i18n %}
+{% load admin_static %}
-{% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %}
+{% block extrahead %}
+<script>window.jQuery || document.write('<script src="{% static 'jquery.js' %}">\x3C/script>')</script>
# Source: http://pytest.org/dev/example/simple.html#making-test-result-information-available-in-fixtures
@pytest.mark.tryfirst
def pytest_runtest_makereport(item, call, __multicall__):
# execute all other hooks to obtain the report object
rep = __multicall__.execute()
# set an report attribute for each phase of a call, which can
# be "setup", "call", "teardown"
setattr(item, "rep_" + rep.when, rep)
This file has been truncated, but you can view the full file.
[{"pk": 1, "model": "cities_light.country", "fields": {"code2": "AD", "code3": "AND", "name": "Andorra", "tld": "ad", "alternate_names": "Principality of Andorra,Andora", "continent": "EU", "geoname_id": 3041565, "name_ascii": "Andorra", "slug": "andorra"}}, {"pk": 2, "model": "cities_light.country", "fields": {"code2": "AE", "code3": "ARE", "name": "United Arab Emirates", "tld": "ae", "alternate_names": "Vereinigte Arabische Emirate,Emirados \u00c1rabes Unidos,Emiratos \u00c1rabes Unidos,Zjednoczone Emiraty Arabskie,UAE", "continent": "AS", "geoname_id": 290557, "name_ascii": "United Arab Emirates", "slug": "united-arab-emirates"}}, {"pk": 3, "model": "cities_light.country", "fields": {"code2": "AF", "code3": "AFG", "name": "Afghanistan", "tld": "af", "alternate_names": "Islamic Republic of Afghanistan,Afeganist\u00e3o,Afganistan", "continent": "AS", "geoname_id": 1149361, "name_ascii": "Afghanistan", "slug": "afghanistan"}}, {"pk": 4, "model": "cities_light.country", "fields": {"code2": "AG", "code3": "ATG"
This file has been truncated, but you can view the full file.
diff --git c/old_test_project/fixtures/cities_light.json i/old_test_project/fixtures/cities_light.json
deleted file mode 100644
index 4afa26c..0000000
--- c/old_test_project/fixtures/cities_light.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"pk": 1, "model": "cities_light.country", "fields": {"code2": "AD", "code3": "AND", "name": "Andorra", "tld": "ad", "alternate_names": "Principality of Andorra,Andora", "continent": "EU", "geoname_id": 3041565, "name_ascii": "Andorra", "slug": "andorra"}}, {"pk": 2, "model": "cities_light.country", "fields": {"code2": "AE", "code3": "ARE", "name": "United Arab Emirates", "tld": "ae", "alternate_names": "Vereinigte Arabische Emirate,Emirados \u00c1rabes Unidos,Emiratos \u00c1rabes Unidos,Zjednoczone Emiraty Arabskie,UAE", "continent": "AS", "geoname_id": 290557, "name_ascii": "United Arab Emirates", "slug": "united-arab-emirates"}}, {"pk": 3, "model": "cities_light.country", "fields": {"code2": "AF", "code3": "AFG", "name": "Afghanistan", "tld": "af", "alternate_names": "Islamic Rep