Discover gists
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
- Create a bare clone of the repository.
(This is temporary and will be removed so just do it wherever.)
git clone --bare git@github.com:usi-systems/easytrace.git
Original post : https://unix.stackexchange.com/a/310699
nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
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
/* Utilities */ | |
var RANDOM = function() {}; | |
function _randomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
function _randomHex(len) { | |
var hex = '0123456789abcdef'; |
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
(setq wl-copy-process nil) | |
(defun wl-copy (text) | |
(setq wl-copy-process (make-process :name "wl-copy" | |
:buffer nil | |
:command '("wl-copy" "-f" "-n") | |
:connection-type 'pipe)) | |
(process-send-string wl-copy-process text) | |
(process-send-eof wl-copy-process)) | |
(defun wl-paste () | |
(if (and wl-copy-process (process-live-p wl-copy-process)) |
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
""" | |
Streaming FFmpeg to HTTP, via Python's Flask. | |
This is an incredibly simple example, which will yield issues due to inconsistant input and output rates. | |
If you're going to use this, VLC works okay as a client. | |
You really need to move FFmpeg into a separate thread, which should help stream audio more consistantly to the HTTP client. | |
Example by Anthony Eden (https://mediarealm.com.au) | |
""" | |
from flask import Flask |
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
class AsyncMethodJob < ApplicationJob | |
queue_as :default | |
def perform(target:, method_name:, args:, queue_name: :default) | |
self.class.queue_as(queue_name) | |
# `target` could be either an instance or a class | |
target = target.constantize if target.is_a?(String) # Convert class name to class object if needed | |
target.send(method_name, *args) | |
end | |
end |
NewerOlder