-
Install "Syntax Highlighting for Code" plugin: https://ankiweb.net/shared/info/1463041493
-
In the plugin's options (
Tools > Syntax Highlighting Options
), set:- Line numbers
- Center code fragments
- Use CSS classes
-
Enter following HTML and CSS templates in
Tools > Manage Note Types > Cards
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
# You can run this turing machine in https://turingmachine.io/ | |
name: sum of two positive integers | |
source code: |+ | |
# Sum of two positive integers | |
# Demo for this talk: https://querateam.github.io/talks/presentations/Theory-of-Computation-1/ | |
input: '111110111' | |
blank: 0 | |
start state: s1 | |
table: | |
s1: |
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
# You can run this turing machine in https://turingmachine.io/ | |
name: determine parity | |
source code: |- | |
# Determine Parity | |
# Demo for this talk: https://querateam.github.io/talks/presentations/Theory-of-Computation-1/ | |
input: '11111' | |
blank: 0 | |
start state: s1 | |
table: | |
s1: |
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
# You can run this turing machine in https://turingmachine.io/ | |
name: multiply by two | |
source code: |- | |
# Multiply by two | |
# Demo for this talk: https://querateam.github.io/talks/presentations/Theory-of-Computation-1/ | |
input: '1111' | |
blank: 0 | |
start state: s1 | |
table: | |
s1: |
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
# You can run this turing machine in https://turingmachine.io/ | |
name: Print three strokes | |
source code: |- | |
# Print three strokes | |
# Demo for this talk: https://querateam.github.io/talks/presentations/Theory-of-Computation-1 | |
input: '' | |
blank: 0 | |
start state: s1 | |
table: | |
s1: |
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
$ pacman -S xprintidle xdotool iw | |
$ while true; do idle=`xprintidle`; print `date` ' | ' 'Idle:' "$((idle/1000))s" ' | ' `xdotool getactivewindow getwindowname`; sleep 10; done | |
$ iw dev wlp2s0 info |
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
[ | |
{ | |
"id": 1, | |
"province": "آذربایجان شرقی", | |
"cities": [ | |
{ | |
"name": "آبش احمد", | |
"phonetic": "Ābešahmad", | |
"longitude": "47.3171388", | |
"latitude": "39.04429447" |
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
var jsep = require('jsep'); | |
(function (root) { | |
var COMPOUND = 'Compound', | |
IDENTIFIER = 'Identifier', | |
MEMBER_EXP = 'MemberExpression', | |
LITERAL = 'Literal', | |
THIS_EXP = 'ThisExpression', | |
CALL_EXP = 'CallExpression', |
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
<?xml version="1.0" encoding="utf-8"?> | |
<colorTheme id="28852" name="IceDream" modified="2014-07-23 15:43:53" author="Mohammad Javad Naderi"> | |
<searchResultIndication color="#DDDDDD" /> | |
<filteredSearchResultIndication color="#DDDDDD" /> | |
<occurrenceIndication color="#DDDDDD" /> | |
<writeOccurrenceIndication color="#DDDDDD" /> | |
<findScope color="#BCADAD" /> | |
<deletionIndication color="#9b5656" bold="false" /> | |
<sourceHoverBackground color="#EEEEEE" /> | |
<singleLineComment color="#BBBBBB" italic="true" /> |
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
style "gtkcompact" { | |
# font_name="Liberation 8" | |
GtkButton::defaultborder={0,0,0,0} | |
GtkButton::defaultoutsideborder={0,0,0,0} | |
GtkButtonBox::childminwidth=0 | |
GtkButtonBox::childminheigth=0 | |
GtkButtonBox::childinternalpadx=0 | |
GtkButtonBox::childinternalpady=0 | |
GtkMenu::vertical-padding=0 | |
GtkMenuBar::internalpadding=0 |
NewerOlder