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/sh | |
| while inotifywait -e modify .; do | |
| lessc style.less > style.css | |
| NOW=(date +"%T") | |
| echo "$NOW : compiled style.less" | |
| done |
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
| import os | |
| import filer | |
| from shutil import copyfile | |
| def ensure_dir(file_path): | |
| if not os.path.exists(file_path): | |
| os.makedirs(file_path) | |
| backup_dir = "/backup_dir" |
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
| import sqlite3 | |
| import os | |
| filename = "simple.db" | |
| search = "search" | |
| with sqlite3.connect(filename) as conn: | |
| conn.row_factory = sqlite3.Row | |
| cursor = conn.cursor() | |
| cursor.execute("SELECT name FROM sqlite_master WHERE type='table'") | |
| for tablerow in cursor.fetchall(): |
NewerOlder