Skip to content

Instantly share code, notes, and snippets.

View eggfly's full-sized avatar
🎯
flutter-hacking

eggfly

🎯
flutter-hacking
  • Beijing
View GitHub Profile
@eggfly
eggfly / test
Created February 10, 2014 03:25
desc
test content
自己动手写CPU
跳转至: 导航、 搜索
目录
1 处理器与MIPS
2 可编程逻辑器件与Verilog HDL
3 教学版OpenMIPS处理器蓝图
4 第一条指令ori
5 逻辑、移位与nop
6 移动
@eggfly
eggfly / createVMDKPartition.sh
Created July 18, 2017 08:01 — forked from JrCs/createVMDKPartition.sh
Add a partition to VMWare Virtual Disk
#!/bin/bash
GamePartitionUUID='E7F33C26-2F83-41B2-B601-E9BF29AF9C09'
device=$(diskutil info "$GamePartitionUUID" | sed -n 's/.*Device Identifier: *//p')
if [[ -z "$device" ]]; then
echo "Impossible de déterminer la partition 'Games' avec l'UUID $GamePartitionUUID !" >&2
exit 1
fi
disk="${device%s*}"
part="${device##*s}"
@eggfly
eggfly / header.php
Created October 12, 2017 12:49 — forked from hiing/header.php
wordpress首页添加访问密码
<?php
if (!isset($_SESSION)) {
session_start();
}
if( isset($_SESSION['authenticated']) )
{
if($_SESSION['authenticated'] == 'yes')
{
$authenticated = 'yes';
#!/bin/sh
#
# This script builds & bundles Python for Android
# You'll end up with a tar.bz2 file that contains a Python distribution
#
# Requires all prerequisites to build Android on the host, and the NDK
# installed.
#
# This script creates a file python4android.tbz2. Unpack it on your device
# (into a non-noexec partition!) and enjoy.
@eggfly
eggfly / blaster.c
Created August 1, 2018 03:46 — forked from yorickdewid/blaster.c
Blaster worm source
/*
DECOMPILED SOURCE FOR MS RPC DCOM BLASTER WORM
<http://robertgraham.com/journal/030815-blaster.c>
This file contains source code for the "msblast.exe" worm
that was launched against the Internet on August 10, 2003.
This "source-code" was decompiled using "IDApro", an
"interactive disassembler". IDA is the most popular tool
@eggfly
eggfly / ESP32_MPU6050-DMP_WiFi.ino
Created August 24, 2019 02:26 — forked from arvidtp/ESP32_MPU6050-DMP_WiFi.ino
Code for using the MPU6050-DMP6 with the Sparkfun ESP32 Thing and UDP data sent over WiFi - Stable!
/* ===================== TO DO =====================
* - Add remote control of esp.reset()?
* - Add another sensor of some kind?
*
*/
#include <WiFi.h>
#include <WiFiUdp.h>
#include <Wire.h>
## M5StickV MPU6886 maixpy
## Referred to the following
## https://github.com/m5stack/M5StickC/blob/master/src/utility/MPU6886.cpp
##https://github.com/m5stack/M5-Schematic/blob/master/datasheet/MPU-6886-000193%2Bv1.1_GHIC.PDF.pdf
from machine import I2C
MPU6886_ADDRESS=0x68
MPU6886_WHOAMI=0x75
MPU6886_ACCEL_INTEL_CTRL= 0x69
public class Dexter {
private static String optimizedDirectory = "optimized";
private static String workDirectory = "working";
public static void loadFromAssets(Context context, String fileName) throws Exception {
File optimized = new File(optimizedDirectory);
optimized = context.getDir(optimized.toString(), Context.MODE_PRIVATE);
optimized = new File(optimized, fileName);
package com.xinghui.notificationlistenerservicedemo;
import android.app.ActivityManager;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.Process;