Skip to content

Instantly share code, notes, and snippets.

View gdouzwt's full-sized avatar
💬
I may be slow to respond.

招文桃 gdouzwt

💬
I may be slow to respond.
View GitHub Profile
@Informatic
Informatic / README.md
Last active July 22, 2024 10:18
openlgtv webOS hacking notes

This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.

Homebrew app ideas

@Andrey2G
Andrey2G / encoding.txt
Last active June 13, 2024 07:55
Video Encoding with multiple resolutions
ffmpeg -i "c:/videos/sample.mp4
-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0
-c:v libx264 -crf 22 -c:a aac -ar 48000
-filter:v:0 scale=w=480:h=360 -maxrate:v:0 600k -b:a:0 64k
-filter:v:1 scale=w=640:h=480 -maxrate:v:1 900k -b:a:1 128k
-filter:v:2 scale=w=1280:h=720 -maxrate:v:2 900k -b:a:2 128k
-var_stream_map "v:0,a:0,name:360p v:1,a:1,name:480p v:2,a:2,name:720p"
-preset slow -hls_list_size 0 -threads 0 -f hls -hls_playlist_type event -hls_time 3
-hls_flags independent_segments -master_pl_name "name-pl.m3u8"
"c:/videos/encoded/name-%v.m3u8"
@bdemers
bdemers / AppExample.java
Created October 11, 2019 17:37
Create and Parse JWTs in Java with JJWT
package com.okta.developer;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jws;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.security.Keys;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.Base64;

Kubectl plugin

This plugin adds completion for the Kubernetes cluster manager, as well as some aliases for common kubectl commands.

To use it, add kubectl to the plugins array in your zshrc file:

plugins=(... kubectl)
@markwhitaker
markwhitaker / MimeTypes.java
Last active August 17, 2021 10:21
Standard MIME type constants ready to use in a Java project. Now a library: see https://github.com/markwhitaker/MimeTypes.Java
public final class MimeTypes
{
public static final class Application
{
public static final String ATOM_XML = "application/atom+xml";
public static final String ATOMCAT_XML = "application/atomcat+xml";
public static final String ECMASCRIPT = "application/ecmascript";
public static final String JAVA_ARCHIVE = "application/java-archive";
public static final String JAVASCRIPT = "application/javascript";
public static final String JSON = "application/json";
@planetoftheweb
planetoftheweb / bootstrapCDN.html
Created July 8, 2015 01:25
Bootstrap 3 CDN Page Code
<!-- HEAD SECTION -->
<!-- IE Edge Meta Tag -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
@mraible
mraible / build.gradle
Created April 17, 2015 05:47
Asciidoctor for The JHipster Mini-Book
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.4'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.6'
}
@robinhowlett
robinhowlett / YesNoBooleanDeserializer.java
Last active September 4, 2022 20:27
Building a Custom Jackson Deserializer
package com.robinhowlett.blog;
import java.io.IOException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
@lvzongting
lvzongting / Mac os 打印驱动 for linux
Created October 27, 2014 03:28
很多打印机只提供Mac os 打印驱动, 因为linux和Mac os 都使用的是标准的Unix 通用打印系统,所以提取Mac OS下的驱动ppd文件即可在linux使用打印机了。
Mac os 打印驱动 for linux
很多打印机只提供Mac os 打印驱动, 因为linux和Mac os 都使用的是标准的Unix 通用打印系统,所以提取Mac OS下的驱动ppd文件即可在linux使用打印机了。这里只是记录了一个方法,为了方便大家使用,我正在寻找一个网络空间可以将我提取出来的这些ppd驱动文件上传上去提供大家下载,可能还会提供一个便于检索的网页,如果大家有需要什么打印驱动的话,可以在这个gist后面留言。
当然,我也会积极的将这些文件进行打包,然后丢到各大软件源中。以方便大家的使用。
真心希望,linux这样好用的系统能快速发展,普及,能让更多的人感受到使用linux的快乐。
苹果系统 Mac OS 打印驱动用在linux系统。(通过cups 通用Unix打印系统ppd格式化文件驱动打印机)
@grant-roy
grant-roy / update-jekyll
Last active March 28, 2024 10:45
Bash script to poll Github and rebuild and restart a jekyll site
#!/bin/sh
#This is a simple bash script that will poll github for changes to your repo,
#if found pull them down, and then rebuild and restart a Jekyll site running
#in Nginx. Note, we cannot use cron to schedule a job every 5 seconds, so we create
#a script that executes an infinite loop that sleeps every 5 seconds
#We run the script with nohup so it executes as a background process: $nohup ./update-jekyll
while true
do