Skip to content

Instantly share code, notes, and snippets.

View nickfox-taterli's full-sized avatar
😰
想哭

Tater Li nickfox-taterli

😰
想哭
View GitHub Profile
@nickfox-taterli
nickfox-taterli / LEDBlink.c
Created July 8, 2018 13:24
LPC43xx SCT Blink
@nickfox-taterli
nickfox-taterli / MSP430_Flash_RW
Created July 8, 2018 13:25
MSP430G2553 Seg Flash R/W Code
#include <msp430.h>
#include <stdint.h>
void FlashErase(uint16_t addr)
{
FCTL3 = FWKEY;
FCTL1 = FWKEY + ERASE;
while(FCTL3 & BUSY);
*(uint8_t *)addr = 0;
FCTL1 = FWKEY;
@nickfox-taterli
nickfox-taterli / rpi-fbcp.c
Created August 30, 2018 08:07
fbcp for rpi
#include <stdio.h>
#include <syslog.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>
#include <linux/fb.h>
#include <sys/mman.h>
#include <bcm_host.h>
int process() {
@nickfox-taterli
nickfox-taterli / huawei_cloudtable.py
Created March 17, 2019 16:13
华为云Serverless版表格储存数据库
import urllib.request
import ssl
import json
import json
import base64
table_name = ''
token = ''
ep_url = 'https://hbase-cloudtable.cn-north-1.myhuaweicloud.com/v1/929213ae947c47de866553f0c025741d'
@nickfox-taterli
nickfox-taterli / power_fuck.sh
Last active March 21, 2019 10:00
Powerboard service fuck
#!/bin/sh
# wget -qO- https://git.io/fjf12 | sh
# curl -Lso- https://git.io/fjf12 | sh
if [ $(id -u) -ne 0 ]; then
printf "Script must be run as root or sudo."
exit 1
fi
@nickfox-taterli
nickfox-taterli / shadow_sample.c
Last active June 14, 2019 08:20
shadow_sample for docker pi relay
/*
* Tencent is pleased to support the open source community by making IoT Hub available.
* Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
@nickfox-taterli
nickfox-taterli / pppoe.c
Created October 18, 2019 06:15
PPPoE Flood
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/ether.h>
#include <netpacket/packet.h>
#include <netinet/in.h>
#include <time.h>
@nickfox-taterli
nickfox-taterli / zhihu.php
Created October 18, 2019 06:16
ZhiHu Spider
<?php
require 'vendor/autoload.php';
$mongo = new MongoDB\Client("mongodb://taterli:f697bb912da7f4d210382c67@127.0.0.1:27017");
$db = $mongo->wa; //选择数据库
$collection = $db->zhihu; //选择文档集合
$next_qid = null; /* 首次 */
$first_qid = 0;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;
@nickfox-taterli
nickfox-taterli / CP2112.cs
Created October 19, 2019 06:57
CP2112 Example
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;