Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Aristotelis glutanimate

🎯
Focusing
Block or report user

Report or block glutanimate

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@glutanimate
glutanimate / __init__.py
Last active Oct 9, 2018
Quick proof-of-concept add-on for Anki web view hooks PR. Please copy into subfolder in addons21 directory to test.
View __init__.py
# Quick proof-of-concept add-on for Anki PR:
from anki.hooks import addHook
def addCSS(head, instance):
print(head, instance)
return head + "<style>.addition1{color:green;}</style>"
def addCSS2(head, instance):
print(head, instance)
View touchbar_demo.py
#!/usr/bin/env python
# touchbar_demo.py
# dsandler@dsandler.org
# PyObjC proof of concept NSTouchBar implementation.
# Note that exceptions in the delegates will crash with "Illegal instruction: 4"
# rather than printing helpful stack traces; look in CrashReporter for the
# exception string.
import objc
from AppKit import \
View touchbar_demo.py
#!/usr/bin/env python
# touchbar_demo.py
# dsandler@dsandler.org
# PyObjC proof of concept NSTouchBar implementation.
# Note that exceptions in the delegates will crash with "Illegal instruction: 4"
# rather than printing helpful stack traces; look in CrashReporter for the
# exception string.
import objc
from AppKit import \
@glutanimate
glutanimate / anki21_editor_btns.py
Created Aug 23, 2017
Small test add-on for a few pull requests
View anki21_editor_btns.py
# -*- coding: utf-8 -*-
import os
from aqt.qt import *
from anki.hooks import addHook
from aqt.utils import shortcut
from aqt.editor import Editor
def _addButton(self, icon, cmd, tip="", label="", id=None, toggleable=False):
@glutanimate
glutanimate / anki_mobile_card.html
Created Nov 12, 2016 — forked from redoPop/anki_mobile_card.html
HTML used by AnkiMobile to render card templates; a reference for creating advanced Anki card templates with special HTML/CSS. When used by AnkiMobile, the card's HTML replaces the `<!-- (Card contents) -->` comment in this gist, with the shared styles dropped inline inside a `<style>` tag.
View anki_mobile_card.html
<!doctype html>
<html class=" webkit safari mobile iphone js">
<head>
<meta name="viewport" content="width=device-width;">
<style id="ss"></style>
<style>
body {
text-align: center;
font-size: 1em;
-webkit-transform: translate3d(0,0,0);
@glutanimate
glutanimate / TaskerFlashlightButton.prj.xml
Last active Jan 7, 2017
Toggle flashlight on Android via power button press sequence
View TaskerFlashlightButton.prj.xml
<TaskerData sr="" dvi="1" tv="4.6u3m">
<Profile sr="prof92" ve="2">
<cdate>1426618335190</cdate>
<clp>true</clp>
<edate>1427251395506</edate>
<id>92</id>
<mid0>93</mid0>
<nme>FlashlightButton</nme>
<Event sr="con0" ve="2">
<code>208</code>
@glutanimate
glutanimate / toggle_ppa.sh
Last active Dec 29, 2015
Simple script to enable/disable PPAs
View toggle_ppa.sh
#!/bin/bash
#
# toggle_ppa.sh
#
# created by souravc (http://askubuntu.com/users/127327/)
# modified by Glutanimate (http://askubuntu.com/users/81372/)
#
# originally released at http://askubuntu.com/q/383605/81372
#
# DESCRIPTION: Detects if PPA is active/inactive and deactivates/activates it
You can’t perform that action at this time.