Skip to content

Instantly share code, notes, and snippets.

View qqli007's full-sized avatar

星空 qqli007

  • BeiJing
View GitHub Profile
@LewdEwe-ErikWallace
LewdEwe-ErikWallace / clipboard.html
Last active June 4, 2020 07:46
This is an example of how to poll the clipboard for changes in an Electron application. See notes in HTML.
<!DOCTYPE html>
<html lang="en">
<head>
<title>My App - Clipboard</title>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' chrome-extension://*;">
</head>
<body>
@dblock
dblock / dokku-mongo-export.sh
Last active June 11, 2020 12:20
Backup MongoDB databases with Dropbox and Dokku
#!/bin/bash
set -e
echo "Backing up MongoDB databases to Dropbox ..."
dt=$(date +"%Y-%m-%d")
echo " today is $dt"
@race604
race604 / adb+
Last active August 20, 2023 09:03
#!/bin/bash
# Script adb+
# Run any command adb provides on all your currently connected devices,
# Or prompt to select one device
showHelp() {
echo "Usage: adb+ [-a] <command>"
echo " -h: show help"
echo " -a: run command on all device"
echo " command: normal adb commands"
@HugoGresse
HugoGresse / 1 DynamicExoPlayer
Last active September 5, 2018 03:42
ExoPlayer implementation with a persisten TextureView & SurfaceTexture among context
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Color;
import android.graphics.SurfaceTexture;
import android.os.Build;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Surface;
import android.view.TextureView;
@wuliupo
wuliupo / lottery.html
Last active February 1, 2023 07:27
抽奖程序
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312"/>
<title>抽奖活动</title>
<style type="text/css">
body {padding-top:100px;font:12px "\5B8B\4F53",sans-serif;text-align:center;}
.result_box {margin:0 auto;width:700px;padding:100px 0;text-align:center;border:3px solid #40AA53;background:#efe;}
.result_box #oknum {width:680px;color:#cc0000;font-size:50pt;font-family:Verdana;text-align:center;border:none;background:#efe;}
.button_box {margin-top:50px;}
@devunwired
devunwired / GifDecoder.java
Last active October 8, 2024 08:32
An optimized implementation of GifDecoder for Android devices.
/**
* Copyright (c) 2013 Xcellent Creations, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions: