sudo yum -y install epel-release
sudo yum -y update
Download repository
| #!/bin/bash | |
| # | |
| # Backup a Postgresql database into a daily file. | |
| # | |
| BACKUP_DIR=/pg_backup | |
| DAYS_TO_KEEP=14 | |
| FILE_SUFFIX=_pg_backup.sql | |
| DATABASE= | |
| USER=postgres |
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="de.mobilej.overlay" | |
| android:versionCode="1" | |
| android:versionName="1.0" > | |
| <uses-sdk android:minSdkVersion="14" /> | |
| <application android:label="SystemOverlay" > | |
| <activity |
| 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; |
| # 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 |
| 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) |
| import time | |
| from threading import Thread | |
| try: | |
| import socketserver as SocketServer | |
| import http.server as SimpleHTTPServer | |
| except ImportError: | |
| import SocketServer | |
| import SimpleHTTPServer |
| 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 |
| 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; | |
| })); |
| 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); |