Skip to content

Instantly share code, notes, and snippets.

View c9n's full-sized avatar
🎯
Focusing

Lynn c9n

🎯
Focusing
View GitHub Profile
#!/usr/bin/env bash
# Created by LYNN
# At 2018-07-06 09:24:56
#
# Usage:
# px2rpx.sh { path }
#
# Example:
# cd { project root path }
# tools/px2rpx.sh by_mini/pages/address
@c9n
c9n / installation
Created May 31, 2020 14:07
Moto G6
fastboot oem fb_mode_set
fastboot erase userdata
fastboot erase carrier
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash dsp adspso.bin
@c9n
c9n / IDEA.txt
Created January 26, 2020 15:20
Flutter plugin issue
https://github.com/flutter/flutter/blob/73275f08155aeca9d4719bf685499957091a7a09/packages/flutter_tools/lib/src/doctor.dart#L804
@c9n
c9n / gist:af566ca36659da4002bc159ce0978753
Created August 14, 2017 08:50 — forked from rebx/gist:1250106
tshark'ing mysql
live:
tshark -i eth0 -aduration:60 -d tcp.port==3306,mysql -T fields -e mysql.query 'port 3306'
capture:
tcpdump -i eth0 port 3306 -s 1500 -w tcpdump.out
tshark -r tcpdump.out -d tcp.port==3306,mysql -T fields -e mysql.query > query_log.out
var wheelEvt = "onwheel" in document.createElement("div") ? "wheel" :
document.onmousewheel !== undefined ? "mousewheel" :
"DOMMouseScroll";
@c9n
c9n / mount.sh
Last active February 3, 2017 03:38
VBox Mount
mount -t vboxsf -o uid=$UID,gid=$(id -g),dmode=644,fmode=644 Developer /opt/Developer/
mount -t vboxsf -o uid=48,gid=48,dmode=755,fmode=644 Developer /opt/www
@c9n
c9n / pom.xml
Created December 20, 2016 02:30
Minimal POM
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.c9n.mini</groupId>
<artifactId>demo</artifactId>
<version>0.1.0</version>
</project>
@c9n
c9n / demo.java
Created April 14, 2016 14:14
Set intersection
import java.util.HashSet;
import java.util.Set;
class Untitled {
public static void main(String[] args) {
Set<String> s1 = new HashSet<String>();
s1.add("a");
s1.add("b");
Set<String> s2 = new HashSet<String>();
@c9n
c9n / Makefile
Last active March 28, 2016 06:45 — forked from jl2/Makefile
A simple trie data structure in C++.
trie: main.cpp Makefile
clang++ -O3 -std=c++11 -stdlib=libc++ -Wall -o trie main.cpp -lboost_system
@c9n
c9n / demo.conf
Created February 22, 2016 03:09
nginx php conf
server {
server_name demo.abc.com;
root /opt/dccc;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}