This file contains 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
. | |
`-- TV Shows | |
`-- A TV Show Name | |
`-- Season 04 | |
|-- A TV Show Name - S04E05.mp4 | |
`-- A TV Show Name - s04E04.mkv |
This file contains 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
{ | |
"message": "sites-list:update", | |
"payload": { | |
"sites_list": [{ | |
"subsystems": [{ | |
"num_guest": 0, | |
"status": "error", | |
"num_adopted": 2, | |
"rx_bytes-r": 0, | |
"num_pending": 0, |
This file contains 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 time | |
import sys | |
import vlc | |
from datetime import datetime | |
def main(rtsp_stream, period=1, output='snapshot%s.png'): | |
player = vlc.MediaPlayer(rtsp_stream) | |
player.play() | |
time.sleep(5) |
This file contains 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
(ql:quickload :lispbuilder-sdl) | |
(defvar *SIZE* 800) | |
(defvar *SHADES* 50) | |
(defvar *STEP* (/ *SIZE* *SHADES*)) | |
(defvar *COL* 0) | |
(defun box (n) | |
(cond ((>= n *SHADES*) nil) | |
((< n *SHADES*) | |
(progn |
This file contains 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
-module(proxy_protocol). | |
%% Code between markers is stolen from Cowboy | |
%%% BEGIN STOLEN CODE | |
-export([parse_request/3]). | |
-export([start_link/4]). | |
-export([init/4]). | |
This file contains 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 requires_open_websocket(f): | |
def wrapper(self, *args): | |
if not self.ws_connection: | |
return | |
return f(self, *args) | |
return wrapper |
This file contains 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 asyncio | |
@asyncio.coroutine | |
def foo1(): | |
while True: | |
print("foo1 running") | |
yield from asyncio.sleep(3) | |
This file contains 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
-spec strchr(Bin :: binary(), C :: char()) -> non_neg_integer(). | |
strchr(Bin, C) when is_binary(Bin) -> | |
% try to use the R14B binary module | |
try binary:match(Bin, <<C>>) of | |
{Index, _Length} -> | |
Index + 1; | |
nomatch -> | |
0 | |
catch | |
_:_ -> |
This file contains 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
-module(e). | |
-define(YO, 123). | |
-define(YO2, 10). | |
-compile([export_all, debug_info]). | |
f() -> | |
case 123 of | |
A -> | |
A; | |
B -> |
This file contains 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
--type product_type() :: a | b | c | d | |
+-type({product_type, | |
+ {type, 21, union, | |
+ [{atom, 21, a}, {atom, 21, b}, | |
+ {atom, 21, c}, {atom, 21, d}]}, | |
+ []}). |
NewerOlder