Skip to content

Instantly share code, notes, and snippets.

View mikeshi80's full-sized avatar

Mike Shi mikeshi80

  • Shanghai Hyron Software Co Ltd.
  • Shanghai, China
View GitHub Profile
@Hakky54
Hakky54 / openssl_commands.md
Last active May 3, 2024 03:14 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@dvlden
dvlden / ffmpeg.md
Last active April 17, 2024 19:53
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@epcim
epcim / ovpn_easyrsa_pki.md
Last active March 28, 2024 07:00
openvpn easy-rsa certs (+revoke)
@kekru
kekru / traefik-redirect-path.md
Last active March 12, 2024 15:15
Traefik redirect / (root) to sub path with Docker labels

Traefik: redirect base or root path to a subpath

This is tested with Traefik 1.7

This is how to redirect the root or base path to a sub path in Traefik using Docker labels:
Goals

  • https://example.com -> https://example.com/abc/xyz/
  • https://example.com/ -> https://example.com/abc/xyz/
  • https://example.com/something -> no redirect
@gpetuhov
gpetuhov / ubuntu_usb_fix.txt
Last active February 7, 2024 02:31
Ubuntu USB autosuspend disable
If Android phone constantly disconnects:
1. Try to disable Ubuntu USB autosuspend
https://www.makeuseof.com/tag/fix-usb-device-port-linux/
cat /sys/module/usbcore/parameters/autosuspend
(if the result is 2, then autosuspend is enabled)
sudo nano /etc/default/grub
Change
@HaiyangXu
HaiyangXu / Server.py
Created May 18, 2014 14:00
A simper python http server can handle mime type properly
# -*- coding: utf-8 -*-
#test on python 3.4 ,python of lower version has different module organization.
import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
# !/usr/bin/env python
# -*- coding:utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class overlay(QWidget):
def __init__(self, parent=None):
super(overlay, self).__init__(parent)
@justinatack
justinatack / Quasar Framework Login Form Card Component Example
Last active November 2, 2023 22:22
Quasar Framework Login Form Card Component Example
<template>
<q-page class="bg-light-green window-height window-width row justify-center items-center">
<div class="column">
<div class="row">
<h5 class="text-h5 text-white q-my-md">Company & Co</h5>
</div>
<div class="row">
<q-card square bordered class="q-pa-lg shadow-1">
<q-card-section>
<q-form class="q-gutter-md">
@daicham
daicham / .gitlab-ci.yml
Last active May 3, 2023 07:05
A sample of .gitlab-ci.yml for a gradle project
image: java:8-jdk
stages:
- build
- test
- deploy
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug