Skip to content

Instantly share code, notes, and snippets.

@x43x61x69
x43x61x69 / README
Last active March 24, 2018 16:25
Starbucks (Taiwan) Email Validation RFC 2822 Compliant Fix
// Copyright (C) 2017 Zhi-Wei Cai.
//
// 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 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@x43x61x69
x43x61x69 / Spotify.txt
Created January 14, 2018 14:18
Spotify Ads/Tracking Domains
adeventtracker.spotify.com
spclient.wg.spotify.com
d3rt1990lpmkn.cloudfront.net
adjust.com
doubleclick.net
googleadservices.com
googlesyndication.com
googletagmanager.com
googletagservices.com
google-analytics.com
@x43x61x69
x43x61x69 / switch_romfs.py
Created July 19, 2017 14:15 — forked from SciresM/switch_romfs.py
Switch RomFS (IStorage) -> Files
from struct import unpack as up
import sys, os
dirs, files = None, None
def read_at(fp, off, len):
fp.seek(off)
return fp.read(len)
def read_u8(fp, off):
@x43x61x69
x43x61x69 / LICENSE
Last active July 11, 2017 05:36
Light Counter Example for BlocklyDuino Editor
/*
Light Counter with BLE Control.
Copyright (C) 2017 Zhi-Wei Cai.
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@x43x61x69
x43x61x69 / LWiFi_LBLE.ino
Last active March 20, 2019 02:09
Dynamic Wi-Fi Connection via BLE for LinkIt 7697
/*
Dynamic Wi-Fi Connection via BLE.
Copyright (C) 2017 Zhi-Wei Cai.
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 3 of the License, or
(at your option) any later version.
@x43x61x69
x43x61x69 / flash.sh
Last active January 25, 2017 08:53
7688 Duo Bootloader Re-flash
avrdude -c linuxgpio -C /etc/avrdude.conf -p m32u4 -U flash:w:/etc/arduino/Caterina-smart7688.hex -Uflash:w:$1 $2
@x43x61x69
x43x61x69 / udid.sh
Created March 21, 2016 16:43
Get UDID / serial number and hardware version of all connected Apple device in OS X.
system_profiler SPUSBDataType | awk '/:$/{sub(/^ */,"");name=$0}/Vendor ID:/{$1=$2=$3="";vender=$0}/Version:/{version=$2}/Serial Number:/{id=$3;print name,version,id,vender}' | grep 'Apple Inc.'
@x43x61x69
x43x61x69 / String+Extension.swift
Created August 31, 2015 20:27
Xcode 7 beta - String Extension for NSString Methods
// From: https://forums.developer.apple.com/thread/13580
extension String {
var lastPathComponent: String {
get {
return (self as NSString).lastPathComponent
}
}
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* struct TreeNode *left;
* struct TreeNode *right;
* };
*/
struct TreeNode* invertTree(struct TreeNode* root) {
if (root) {