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
#!/bin/bash | |
split () { grep -o .; } | |
remove_spaces () { grep -vP '[[:space:]]+'; } | |
count () { sort | uniq -c; } | |
read -r _ # just ignore and halt on EoF | |
while read -r sentence | |
do |
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
class Getitem(object): | |
def __init__(self, a): | |
self.a = a | |
def __getitem__(self, attr): | |
print(f"__getitem__ {attr}") | |
return getattr(self, attr) | |
class Setitem(Getitem): | |
def __setitem__(self, attr, value): |
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
#!/bin/bash | |
USER_ID=$(id -u "$(whoami)") | |
GROUP_ID=$(id -g "$(whoami)") | |
XSOCK=/tmp/.X11-unix | |
XAUTH=$(mktemp /tmp/docker.xauth.XXXX) | |
trap 'rm $XAUTH; ' EXIT |
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
sed \ | |
-r \ | |
-e 's/^%.*$//' \ | |
-e 's/\\emph\{([^{]+)\}/\1/g' \ | |
-e 's/\\ref\{([^{]+)\}/\1/g' \ | |
-e 's/\\cite\{([^{]+)\} //g' \ | |
-e 's/ \\cite\{([^{]+)\}//g' \ | |
-e 's/\$.+\$/formula/' \ | |
-e 's/~/ /' \ | |
-e '/\\begin\{figure\}/,/\\end\{figure\}/d' \ |
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
#!/bin/bash | |
set -x; | |
apt-get update -yq | |
packages=( | |
# can I haz sandwich? | |
aspell-en | |
hunspell-en-us |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); | |
/* | |
* From https://gist.github.com/BenoitAverty/af633ee20e27f48f9ba7178451432206 | |
*/ | |
#tabbrowser-tabs, #tabbrowser-tabs > .tabbrowser-arrowscrollbox { | |
min-height: 0 !important; | |
} |
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
function run_and_focus (event) { | |
var note = IPython.notebook; | |
var current_cell = note.get_selected_cell(); | |
note.execute_cell_range(note.get_selected_index(), note.ncells()); | |
current_cell.focus_cell(); | |
return false; | |
} |
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
[kwin][Global Shortcuts] | |
Activate Window Demanding Attention=Meta+A | |
ExposeAll=Meta+F | |
ExposeClass=Meta+Shift+F | |
Kill Window=Meta+Ctrl+Alt+Esc | |
MoveMouseToCenter=Meta+F6 | |
MoveMouseToFocus=Meta+F5 | |
ShowDesktopGrid=Meta+F8 | |
Suspend Compositing=Meta+Alt+Shift+F12 | |
Switch One Desktop Down=Meta+Ctrl+J |
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 xml.dom.minidom import parse as parse_xml_from_file | |
from sys import argv, exit | |
# SVG file name (drawing.svg) | |
input_file = argv[1] | |
# Output files prefix (animation/steps) | |
output_prefix = argv[2] | |
# one or more layers suffixes |
NewerOlder