sudo yum -y install epel-release
sudo yum -y update
Download repository
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"sync" | |
"time" | |
"go.uber.org/ratelimit" |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.util.*; | |
public class UrlUtil { | |
private final URL url; | |
private final Map<String, List<String>> parameters; | |
public UrlUtil(String url) throws MalformedURLException { | |
this.url = new URL(url); |
get("/file", ((request, response) -> { | |
response.header("Content-disposition", "attachment; filename=file.txt;"); | |
File file = new File("E:\\_file-test.txt"); | |
OutputStream outputStream = response.raw().getOutputStream(); | |
outputStream.write(Files.readAllBytes(file.toPath())); | |
outputStream.flush(); | |
return response; | |
})); |
sudo usb_modeswitch -v 12d1 -p 1f01 -V 12d1 -P 14DC -J | |
# Bus 001 Device 028: ID 12d1:14dc Huawei Technologies Co., Ltd. E33372 LTE/UMTS/GSM HiLink Modem/Networkcard | |
# Bus 001 Device 027: ID 12d1:1f01 Huawei Technologies Co., Ltd. E353/E3131 (Mass storage mode) | |
sudo usb_modeswitch -h 15s Thu 23 Nov 2017 00:13:05 SAST | |
* usb_modeswitch: handle USB devices with multiple modes | |
* Version 2.5.1 (C) Josua Dietze 2017 | |
* Based on libusb1/libusbx |
import time | |
from threading import Thread | |
try: | |
import socketserver as SocketServer | |
import http.server as SimpleHTTPServer | |
except ImportError: | |
import SocketServer | |
import SimpleHTTPServer | |
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options | |
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full. | |
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}… | |
Getting help: | |
-h — print basic options | |
-h long — print more options | |
-h full — print all options (including all format and codec specific options, very long) |
# While this code still works, I would recommend using Fast API for websockets in modern applications. | |
# See: https://fastapi.tiangolo.com/advanced/websockets/ | |
# Note this is targeted at python 3 | |
import tornado.web | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.websocket | |
import tornado.options |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import sun.security.tools.keytool.CertAndKeyGen; | |
import sun.security.x509.X500Name; | |
import java.io.IOException; | |
import java.security.InvalidKeyException; | |
import java.security.KeyStore; | |
import java.security.KeyStoreException; | |
import java.security.NoSuchAlgorithmException; |