Skip to content

Instantly share code, notes, and snippets.

View 0x5e's full-sized avatar

gaosen 0x5e

  • China, Zhejiang, Hangzhou
  • 06:31 (UTC +08:00)
View GitHub Profile
@0x5e
0x5e / wg-watchdog.sh
Created April 29, 2022 11:01
wireguard watchdog
#!/bin/bash
#
# This watchdog script restart systemctl wireguard service if ping timeout for 3 times
#
# Usage:
# ./wg-watchdog.sh [interface] [ip]
#
# Example:
# ./wg-watchdog.sh wg0 192.168.40.1
#
@bjeanes
bjeanes / ph-260bd-relay.yml
Last active April 29, 2023 15:51
ESPHome definition to pick up readings from the PH-260BD water PH/EC/TDS/Temp sensor - https://www.aliexpress.com/item/1005002707585119.html / https://www.aliexpress.com/item/4001143771176.html
esphome:
name: ph-260bd-relay
platform: ESP32
board: esp32dev
# Enable logging
logger:
logs:
esp32_ble_tracker: INFO
@zxp
zxp / SCITV_UDPXY.M3U
Last active October 29, 2024 09:54
[四川电信ITV 190个频道的组播表] 四川电信IPTV 190个频道的组播表,截取于2017年8月 #scitv #iptv #sichuan
#EXTM3U name="四川电信IPTV"
#EXTINF:-1,CCTV-1高清
http://192.168.2.2/rtp/239.93.0.184:5140
#EXTINF:-1,CCTV-2高清
http://192.168.2.2/rtp/239.93.1.23:6000
#EXTINF:-1,CCTV-3高清
http://192.168.2.2/rtp/239.93.1.11:2223
#EXTINF:-1,CCTV-5高清
http://192.168.2.2/rtp/239.93.1.12:2224
#EXTINF:-1,CCTV-6高清
@githubutilities
githubutilities / Apple-real-device-debugging.md
Last active November 18, 2023 12:41
install ipa using command line

Apple Real Devices Debugging

What you need

  • certificate--which tells your devices that Apple trust you
  • a app id
  • a test device
  • a provisioning profile
@miguelcma
miguelcma / DeviceUID.m
Created May 25, 2015 15:09
iOS Unique Device ID that persists between app reinstalls
/* DeviceUID.h
#import <Foundation/Foundation.h>
@interface DeviceUID : NSObject
+ (NSString *)uid;
@end
*/
// Device.m
@syshen
syshen / gist:c24d127e1adc2783e0e7
Last active June 28, 2020 19:31
Universal framework
######################
# Options
######################
REVEAL_ARCHIVE_IN_FINDER=false
FRAMEWORK_NAME="${PROJECT_NAME}"
SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework"
@chaitanyagupta
chaitanyagupta / re-sign-ios-app.md
Last active November 5, 2024 10:25
How to re-sign an iOS app with another developer account

WARNING These steps are probably out dated and will not work.

To re-sign an iOS app with another developer account, ensure that the following are in place first.

  1. Distribution certificate of the other developer account
  2. A provisioning profile from the other developer account

Note that the Apple requires bundle IDs to be globally unique, even across accounts. So a bundle ID i.e. CFBundleIdentifier from one account can't be used in a different account, even though the team id/prefix would be different.

Ensure that the new distribution certificate is in your keychain and the new provisioning profile on your disk.

@probonopd
probonopd / DIDL-Lite
Last active April 17, 2020 00:54
Play a YouTube video on a Samsung Smart TV using UPNP
<?xml version="1.0" encoding="UTF-8"?>
<DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sec="http://www.sec.co.kr/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">
<item id="f-0" parentID="0" restricted="0">
<dc:title>Video</dc:title>
<dc:creator>vGet</dc:creator>
<upnp:class>object.item.videoItem</upnp:class>
<res protocolInfo="http-get:*:video/mp4:DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000" sec:URIType="public">$URI</res>
</item>
</DIDL-Lite>
@jacobsalmela
jacobsalmela / ssh-in-single-user-mode.sh
Created May 13, 2014 17:51
Enables outbound SSH in Single-user Mode on OS X
#!/bin/bash
# https://github.com/jacobsalmela
# Enables outbound SSH in single-user mode on OS X
# Save this file as /var/root/.profile and boot into single-user mode
# Last tested on 10.9.2
#----------VARIABLES---------
# Manually set ethernet device ID
@carsonmcdonald
carsonmcdonald / mpverify.sh
Created April 4, 2014 02:22
A script that will validate a P12 certificate/key pair with an iOS mobile provisioning profile.
#!/bin/sh
CERT=$1
PROFILE=$2
if [ ! -f "$CERT" ] || [ ! -f "$PROFILE" ]
then
echo "Usage: mpverify.sh <cert p12> <profile>"
exit
fi