Skip to content

Instantly share code, notes, and snippets.

View yrom's full-sized avatar
😹

Yrom Wang yrom

😹
View GitHub Profile
@Tapped
Tapped / uninstall_fuse.sh
Last active July 17, 2023 10:16
Uninstall Fuse
#!/bin/sh
# Call this script as root to fully remove Fuse
# For example: 'sudo ./uninstall_fuse.sh'
rm -rvf \
/Applications/Fuse.app \
/usr/local/bin/fuse \
/usr/local/bin/uno \
/usr/local/bin/unotest \
@chrisbanes
chrisbanes / CollapsingTitleLayout.java
Last active March 26, 2023 11:58
CollapsingTitleLayout
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@maliubiao
maliubiao / tcpinfo.py
Last active August 29, 2015 14:05
功能: 1, 获取系统当前所有的tcp链接信息, 2: 找到绑定某个端口的进程tcpinfo.port_to_pid(port)
import os
import struct
import socket
state_table = (
"EMPTY SLOT",
"ESTABLISHED",
"SENT",
"RECV",
"WAIT1",
@imcaspar
imcaspar / videocj.sh
Last active November 30, 2020 10:02
cut/join videos using ffmpeg without quality loss
#!/bin/bash
#cut/join videos using ffmpeg without quality loss
if [ "$(uname)" == "Darwin" ]; then
if ! [ -x "$(command -v brew)" ]; then
echo 'homebrew is not installed.'
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
if ! [ -x "$(command -v ffmpeg)" ]; then
echo 'ffmpeg is not installed.'
@ficusk
ficusk / GsonRequest.java
Last active April 9, 2024 09:03
A Volley adapter for JSON requests that will be parsed into Java objects by Gson.
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;