Skip to content

Instantly share code, notes, and snippets.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@jchuang1977
jchuang1977 / start_stop_services_via_adb
Created November 11, 2019 08:53 — forked from chris-piekarski/start_stop_services_via_adb
android am force-stop and start services
adb -d shell am force-stop com.android.Settings
adb -d shell am startservice com.android.Settings/com.android.Settings.ServiceName
#list intent receivers
adb shell dumpsys package com.ubnt.restapi | grep intent
adb shell pm list packages
#force factory reset
adb shell "am broadcast -n "com.android.server/com.android.server.MasterClearReceiver" -a android.intent.action.FACTORY_RESET"
@jchuang1977
jchuang1977 / start_stop_services_via_adb
Created November 11, 2019 08:53 — forked from chris-piekarski/start_stop_services_via_adb
android am force-stop and start services
adb -d shell am force-stop com.android.Settings
adb -d shell am startservice com.android.Settings/com.android.Settings.ServiceName
#list intent receivers
adb shell dumpsys package com.ubnt.restapi | grep intent
adb shell pm list packages
#force factory reset
adb shell "am broadcast -n "com.android.server/com.android.server.MasterClearReceiver" -a android.intent.action.FACTORY_RESET"
for ColorBar Test
--------------------------------------------------------
Dump Panel EDID
--------------------------------------------------------
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
--------------------------------------------------------
00| 00 ff ff ff ff ff ff 00 0e 14 93 1c 00 00 00 00
10| 13 17 01 04 95 16 0e 78 0a a7 9d 91 52 54 93 2b
20| 1a 50 54 00 00 fd 01 01 01 01 01 01 01 01 01 01
30| 01 01 01 01 01 01 28 3c 80 a0 70 b0 23 40 3b 27
@jchuang1977
jchuang1977 / test_dsi86.c
Created June 21, 2018 05:55 — forked from UWINGS-KUNYI/test_dsi86.c
SN65DSI86 Testing program
//*****************************************************************************
//
// SN65DSI86 testing program
//
// This is part of revision 1.0 of the EK-TM4C123GXL Firmware Package.
//
//*****************************************************************************
#include <stdint.h>
#include <string.h>
#!/bin/bash
#
# Copyright (C) 2016 RTAndroid Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@jchuang1977
jchuang1977 / timertest.c
Last active March 7, 2018 11:44 — forked from maggocnx/timertest.c
Timer example
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/hrtimer.h>
#include <linux/ktime.h>
unsigned long timer_interval_ns = 1e6;
static struct hrtimer hr_timer;
enum hrtimer_restart timer_callback( struct hrtimer *timer_for_restart )
{
@jchuang1977
jchuang1977 / mpu6050_dmp.c
Created January 23, 2018 03:31 — forked from jannson/mpu6050_dmp.c
打开MPU6050的DMP功能,MPU6050能以400K的速率输出姿态数据(FIFO,一共42个字节);DMP有个好处, 不需要经过复杂的滤波过程,出来的数据,特别是四位元和YRP数据,是直接可用,而且效果比简化KALMAN滤波的要好和稳定,响应速度很快很快;
---------------------
/*****************************************************
http://bbs.cmnxt.com/thread-13197-1-1.html
Date : 2013-7-2
Author :
Chip type : ATmega16
Program type : Application
AVR Core Clock frequency: 16.000000 MHz
Memory model : Small
External RAM size : 0
@jchuang1977
jchuang1977 / gstreamer-build-1.8.sh
Last active June 11, 2017 15:28 — forked from paolocavagnolo/gstreamer-build.sh
Gstreamer 1.8 build script for RPI
#!/bin/bash --debugger
set -e
BRANCH="1.8"
#if grep -q BCM2835 /proc/cpuinfo; then
if grep -q BCM2 /proc/cpuinfo; then
echo "RPI ZERO BUILD!"
RPI="1"
fi
@jchuang1977
jchuang1977 / fbtest.c
Created April 6, 2017 03:55 — forked from rafalrusin/fbtest.c
Linux Frame Buffer Test
#include <linux/fb.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <sys/mman.h>