- Attic https://attic-backup.org/index.html
- zbackup http://zbackup.org/
- backuppc (GUI) http://backuppc.sourceforge.net/
- Git
- Mercurial
- Bzr
package main | |
import ( | |
"bytes" | |
"encoding/gob" | |
"encoding/json" | |
"testing" | |
"time" | |
) |
diff --git a/sources/29-web2py-english/13.markmin b/sources/29-web2py-english/13.markmin | |
index 599d8b8..8e8c01e 100644 | |
--- a/sources/29-web2py-english/13.markmin | |
+++ b/sources/29-web2py-english/13.markmin | |
@@ -1138,8 +1138,8 @@ An alternative to Memcache is use Redis. ``Redis``:inxx | |
Assuming we have Redis installed and running on localhost at port 6379, we can connect to it using the following code (in a model): | |
-`` | |
-from gluon.contrib.redis import RedisCache |
import json, socket, itertools | |
class JSONClient(object): | |
socket = None | |
def __init__(self, addr): | |
self.socket = socket.create_connection(addr) | |
self.id_counter = itertools.count() | |
def __del__(self): | |
if self.socket is not None: | |
self.socket.close() |
I hereby claim:
To claim this, I am signing this object:
04f3096f7f07fff50233225ecf5f7ccc76f5d2835f89dedb379a44942265fb2eae93523ddcef28ca5f71abafe2d75078c411e2af7631e4ceb9f9ac2a19e084db16 andrewallaway |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"sort" | |
"time" | |
"github.com/gocolly/colly" |
#!/usr/bin/env python3 | |
from subprocess import check_output | |
from re import findall, DOTALL, MULTILINE | |
inputs = findall(r'.*?index: (\d+).*?sink: (\d+).*?application\.process\.id = "(\d+)"', | |
check_output(['pacmd', 'list-sink-inputs']).decode("utf-8"), DOTALL|MULTILINE) | |
sinks = findall(r'index: (\d+)', check_output(['pacmd', 'list-sinks']).decode("utf-8")) | |
focused_window = check_output(['xdotool', 'getwindowfocus']) | |
focused_pid = check_output(['xdotool', 'getwindowpid', focused_window]).strip().decode("utf-8") |
#!/usr/bin/env python3 | |
from subprocess import check_output | |
from json import loads | |
from re import findall, DOTALL, MULTILINE | |
def find_focused(tree): | |
if tree["focused"] == True: | |
return tree["pid"] | |
elif 'nodes' in tree: |