Skip to content

Instantly share code, notes, and snippets.

@bdbai
bdbai / IIFE.js
Created January 26, 2016 07:56
TvCat Encrypt Algorithm
$(function() {
var b = "src";
var d = A.d("a", b);
$.get("/api/pg", {
p: d
},
function(a) {
if (a[0] == 1) {
$("#noon").after(a[1])
}
@bdbai
bdbai / youku_speedup.cs
Created May 14, 2016 16:13
Youku speed up claiming
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
namespace HttpWebRequestDemo
{
class Program
{
async static Task<int> Run(string user, string pass) {
@bdbai
bdbai / coreclr-debug
Last active June 30, 2016 10:25
.NET Core Debugger installation output
Starting 'dotnet --info'
.NET Command Line Tools (1.0.0-preview2-003121)
Product Information:
Version: 1.0.0-preview2-003121
Commit SHA-1 hash: 1e9d529bc5
Runtime Environment:
OS Name: opensuse
OS Version: 42.1
@bdbai
bdbai / ring-build-error.sh
Created February 26, 2021 09:43
ring-build-error
cargo build -Z build-std=std,panic_abort --target thumbv7a-uwp-windows-msvc
Compiling core v0.0.0 (C:\Users\bdbai\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core)
Compiling ring v0.16.20
error: failed to run custom build command for `ring v0.16.20`
Caused by:
process didn't exit successfully: `D:\proj\ytflow\src\Maple\leaf\target\debug\build\ring-3b53a4a0d4ad7221\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at '"C:\\Users\\bdbai\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\ring-0.16.20\\pregenerated\\aesv8-armx-linux32.obj": Os { code: 2, kind: NotFound, message: "系统找不到指定的文件。" }', C:\Users\bdbai\.cargo\registry\src\github.com-1ecc6299db9ec823\ring-0.16.20\build.rs:769:10
stack backtrace:
@bdbai
bdbai / dec_qq_number.rs
Created December 1, 2021 17:21
My QQ number Rust quiz
// https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3a2c2557cb1b7d0a313c1e011ba16844
use rand::prelude::*;
fn main() {
let mut rng = SmallRng::from_seed([0x56u8; 32]);
(0..10).for_each(|_| (rng.next_u32(), ()).1);
let key: [u8; 20] = [
70, 121, 148, 150, 158, 158, 73, 14, 197, 164, 232, 30, 239, 6, 112, 10, 130, 30, 55, 173,
];