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
| # This file describes the network interfaces available on your system | |
| # and how to activate them. For more information, see interfaces(5). | |
| source /etc/network/interfaces.d/* | |
| # The loopback network interface | |
| auto lo | |
| iface lo inet loopback | |
| # The primary network interface |
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
| in upload handler | |
| in file close | |
| .. | |
| ---------------------------------------------------------------------- | |
| Ran 2 tests in 0.021s | |
| OK |
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
| 2023-12-31 11:13:12 [ ERROR ] pyunifiprotect.websocket : Error processing websocket message | |
| Traceback (most recent call last): | |
| File "/usr/lib/python3.11/site-packages/pyunifiprotect/websocket.py", line 82, in _process_message | |
| sub(msg) | |
| File "/usr/lib/python3.11/site-packages/pyunifiprotect/api.py", line 691, in _process_ws_message | |
| processed_message = self.bootstrap.process_ws_packet( | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| File "/usr/lib/python3.11/site-packages/pyunifiprotect/data/bootstrap.py", line 561, in process_ws_packet | |
| return self._process_remove_packet(packet, data) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
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
| require 'redis' | |
| require 'active_support/time' | |
| redis = Redis.new | |
| # members are added with a score that is a timestamp of when they should expire | |
| redis.zadd('test-sset', 10.minutes.from_now.to_i, 'app1') | |
| # let's add one in the past so we can test some more | |
| redis.zadd('test-sset', 10.minutes.ago.to_i, 'app2') |
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 flask import Flask, redirect, url_for, request | |
| app = Flask(__name__) | |
| is_maintenance_mode = True | |
| # Always throw a 503 during maintenance: http://is.gd/DksGDm | |
| @app.before_request | |
| def check_for_maintenance(): |
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 -e | |
| DEFAULT_PACKAGES=ssh,language-pack-en-base | |
| DEFAULT_COMPONENTS=main,universe | |
| DEBOOTSTRAP=/usr/sbin/debootstrap | |
| DEFAULT_MIRROR=http://archive.ubuntu.com/ubuntu | |
| DEFAULT_VARIANT=minbase | |
| MIRROR=${STRAP_MIRROR:-$DEFAULT_MIRROR} | |
| ROOTFS=$1 |
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
| { | |
| "builders": | |
| [ | |
| { | |
| "type": "qemu", | |
| "output_directory": "output", | |
| "iso_url": "trusty-server-cloudimg-amd64-disk1.img", | |
| "iso_checksum": "cf12c9878c9fb71c95d8f8c288761a99", | |
| "iso_checksum_type": "md5", | |
| "ssh_wait_timeout": "300s", |
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
| #!/usr/bin/env python | |
| ''' | |
| $ pip install flickrapi | |
| .... | |
| $ FLICKR_API_KEY=mykey ./flick.py tag1[,tag2,tag3...] | |
| ''' | |
| # http://www.flickr.com/services/api/flickr.photos.search.html | |
| import flickrapi |
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 main(args): | |
| pass | |
| def enable_borders(tab): | |
| tm = tab.tab_manager_ref() | |
| if tm is None: | |
| return | |
| w = tab.active_window | |
| tab.borders( | |
| [w], w, tab.current_layout, tm.blank_rects, 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
| class Foo | |
| A = true | |
| def m | |
| A | |
| end | |
| def n | |
| self.class::A | |
| end |
NewerOlder