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 | |
| # pid file is because every thing in linux is a file | |
| # mainly keeps track of the process id | |
| PIDFILE="/tmp/wallpaper-daemon.pid" | |
| LOGFILE="/tmp/wallpaper-daemon.log" | |
| start() { | |
| if [[ -f "$PIDFILE" ]] && kill -0 "$(cat "$PIDFILE")" 2>/dev/null; then | |
| echo "Daemon is already running (PID $(cat "$PIDFILE"))" |
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
| def qsort(inlist): | |
| if inlist == []: | |
| return [] | |
| else: | |
| pivot = inlist[0] | |
| lesser = qsort([x for x in inlist[1:] if x < pivot]) | |
| greater = qsort([x for x in inlist[1:] if x >= pivot]) | |
| return lesser + [pivot] + greater |
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 dontTreadOnMe(e) { | |
| e.stopImmediatePropagation() | |
| } | |
| documnet.addEventListener( | |
| "paste", | |
| dontTreadOnMe, | |
| true | |
| ): |
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
| Find what: | |
| (href|src)="([a-zA-Z0-9/.-]+[^.html])" | |
| Replace with: | |
| $1=\"{% static 'assets/$2' %}" |