Skip to content

Instantly share code, notes, and snippets.

View bclswl0827's full-sized avatar
💭
I may be slow to respond.

Lee bclswl0827

💭
I may be slow to respond.
View GitHub Profile
@bclswl0827
bclswl0827 / index.php
Created December 27, 2020 15:18
Determine whether the request comes from curl
<?php
function is_curl(){
$regex_match="/curl/";
return isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']) or preg_match($regex_match, strtolower($_SERVER['HTTP_USER_AGENT']));
}
if(is_curl()) {
echo 'status=0';
} else {
header( "HTTP/1.1 301 Moved Permanently");
header("Location: https://sdrotg.com");
@bclswl0827
bclswl0827 / manually-setup-flydog-sdr.md
Created July 19, 2021 03:54
FlyDog SDR manual setup guidance on "Clean" Linux distributions

Enable I2C and SPI

pi@raspberrypi:~ $ echo -e "dtparam=i2c_arm=on\ndtparam=spi=on" | sudo tee -a /boot/config.txt
pi@raspberrypi:~ $ echo -e "i2c-dev" | sudo tee -a /etc/modules-load.d/modules.conf
pi@raspberrypi:~ $ sudo dtparam i2c_arm=on
pi@raspberrypi:~ $ sudo modprobe i2c-bcm2708
pi@raspberrypi:~ $ sudo reboot
@bclswl0827
bclswl0827 / Force_HTTP.js
Created March 24, 2023 08:20
Force HTTP with sdrotg.com
const protocol = window.location.protocol;
const hostname = window.location.hostname;
if (protocol === "https:" && hostname.includes("sdrotg.com")) {
location.replace(`http:${location.href.substring(location.protocol.length)}`);
}
// ==UserScript==
// @name Bypassing KiwiSDR extension restrictions
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author ttyUSB0
// @run-at document-end
// @match *
// @icon https://www.google.com/s2/favicons?sz=64&domain=kiwisdr.com
// ==/UserScript==
@bclswl0827
bclswl0827 / imx6ull-14x14-evk.dts
Last active January 21, 2024 06:37
imx6ull-14x14-evk.dts
/*
* Copyright 2019 NXP
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*/
/dts-v1/;
@bclswl0827
bclswl0827 / README.md
Last active January 8, 2024 11:41
Setup Debian MIPS & MIPSEL on QEMU

Setup Debian MIPS & MIPSEL on QEMU

Preparation

$ sudo apt install -y qemu-utils qemu-system-mips qemu-system-gui
$ mkdir -p ~/qemu/mips ~/qemu/mipsel

MIPS