Skip to content

Instantly share code, notes, and snippets.

@gaodeng
gaodeng / index.html
Last active August 16, 2025 08:18
super-browser-window-kit-example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
html,
body {
height: 100%;
@gaodeng
gaodeng / Cache.cs
Created June 15, 2025 06:14 — forked from gileli121/Cache.cs
MS Store - Solution to scenario that software changed from PAID & 30 Days trial to FREE & 30 Days trial
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using WindowTop.Helpers;
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_one/format/pls.pls
#EXTINF:-1,BBC - Radio 2
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_two/format/pls.pls
#EXTINF:-1,BBC - Radio 3
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_three/format/pls.pls
#EXTINF:-1,BBC - Radio 4
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_fourfm/format/pls.pls
#EXTINF:-1,BBC - Radio 4 LW
➜ work curl -v https://dl.wavpub.com/item/66f7a8733fb43ad38a902c7314b6a709.m4a
* Trying 221.195.206.1...
* TCP_NODELAY set
* Connected to dl.wavpub.com (221.195.206.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
@gaodeng
gaodeng / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created November 10, 2020 10:04 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
require('dotenv').config()
const path = require('path')
const fs = require('fs')
const yaml = require('js-yaml')
const { exec } = require('child_process')
const { appBuilderPath } = require('app-builder-bin')
const AWS = require('aws-sdk')
const axios = require('axios')
const packageData = JSON.parse(fs.readFileSync('package.json'))
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p
#EXTINF:-1,BBC - Radio 2
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p
#EXTINF:-1,BBC - Radio 3
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/format/pls/vpid/bbc_radio_three.pls
#EXTINF:-1,BBC - Radio 4
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p
#EXTINF:-1,BBC - Radio 5 live
curl -v https://www.microsoft.com/store/apps/9NMDSZCGGXSJ
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 221.194.156.192...
* TCP_NODELAY set
* Connected to www.microsoft.com (221.194.156.192) port 443 (#0)
* ALPN, offering h2
@gaodeng
gaodeng / GenerateToken.php
Created May 17, 2019 14:13 — forked from BARNZ/GenerateToken.php
Generate a Laravel 5.x hash/token
<?php
use Illuminate\Support\Facades\Password;
# Generate a token in the same style as laravels password reset tokens.
# Will generate something like: 785f616c4978a87ad65a899ed4133b358a4697649c55b0965a7ebb7486bd9801
$token = Password::getRepository()->createNewToken();
# Laravels underlying token generation technique for the above is:
# hash_hmac('sha256', Str::random(40), <your-app-key>)
@gaodeng
gaodeng / react-native-sqlite-2.log
Created March 15, 2019 02:53
react-native-sqlite-2 pouchdb log
2019-03-15 10:45:44.103209+0800 MoonFM[9420:481672] exec()
2019-03-15 10:45:44.103407+0800 MoonFM[9420:481672] queries: (
(
"SELECT COUNT('document-store'.id) AS 'num' FROM 'document-store' JOIN 'by-sequence' ON 'by-sequence'.seq = 'document-store'.winningseq WHERE 'by-sequence'.deleted=0",
(
)
),
(
"SELECT 'by-sequence'.seq AS seq, 'by-sequence'.deleted AS deleted, 'by-sequence'.json AS data, 'by-sequence'.rev AS rev, 'document-store'.json AS metadata FROM 'document-store' JOIN 'by-sequence' ON 'by-sequence'.seq = 'document-store'.winningseq WHERE 'document-store'.id >= ? AND 'document-store'.id <= ? AND 'by-sequence'.deleted = 0 ORDER BY 'document-store'.id ASC LIMIT -1 OFFSET 0",
(