Skip to content

Instantly share code, notes, and snippets.

View xream's full-sized avatar

xream xream

View GitHub Profile
@ayyybe
ayyybe / ccdl.command
Last active May 8, 2025 14:18
Adobe Offline Package Builder v0.1.2 (macOS only) --- No longer being maintained.
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@Gandum2077
Gandum2077 / player.js
Last active January 27, 2020 01:54
改动使其支持播放本地和远程视频 JSBox video player based on AVPlayerViewController
const frameworks = ["AVFoundation", "AVKit"];
frameworks.forEach(name => {
$objc("NSBundle").$bundleWithPath(`/System/Library/Frameworks/${name}.framework`).$load();
});
const gravities = {
resize: "AVLayerVideoGravityResize",
resizeAspect: "AVLayerVideoGravityResizeAspect",
resizeAspectFill: "AVLayerVideoGravityResizeAspectFill",
}
@mhofman
mhofman / MacOS Screen sharing on localhost only.md
Last active January 5, 2025 00:29
MacOS ScreenSharing on localhost only

Force recent MacOS to listen for screen sharing on localhost only, keeping SIP on

All the following has been validated on MacOS Mojave 10.14.6

Problems

While there is a command line preference to accept only local VNC connections, that setting still doesn't prevent the daemon from listening to the wildcard address, and advertise the service on Bonjour. I haven't actually tried to see if it restricted anything in modern versions of the operating system, but here it is for reference:

sudo defaults write /Library/Preferences/com.apple.RemoteManagement.plist VNCOnlyLocalConnections -bool yes
@imbushuo
imbushuo / Vibrator.cs
Last active November 2, 2019 10:57
Turn your Apple Magic Trackpad 2 into a vibrator
using HidSharp;
using System.Linq;
namespace ForceTouchTrigger
{
class Program
{
static void Main(string[] args)
{
// Force Touch Device: USB\VID_05AC&PID_0265&MI_02
@talkingmoose
talkingmoose / Manage App Notifications.bash
Last active January 25, 2024 15:26
macOS Catalina will prompt users to allow Notifications from each app that makes a request. Administrators can manage these prompts using a Configuration Profile. If running Jamf Pro 10.19 or later, I suggest instead using this manifest: https://github.com/talkingmoose/jamf-manifests/blob/master/macOS%20Notifications%20(com.apple.notificationset…
#!/bin/bash
<<ABOUT_THIS_SCRIPT
-----------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
[email protected]
https://gist.github.com/talkingmoose/9faf50deaaefafa9a147e48ba39bb4b0
@riverscn
riverscn / 北京联通IPTV内网组播.m3u
Created August 4, 2019 15:55
北京联通IPTV内网组播地址节目表(239.2.1.1网段)
#EXTM3U name="北京联通IPTV(RTP)”
#EXTINF:-1,CCTV-1高清(1)
rtp://239.2.1.129:8000
#EXTINF:-1,CCTV-2高清(2)
rtp://239.2.1.60:8084
#EXTINF:-1,CCTV-4高清(4)
rtp://239.2.1.105:8092
#EXTINF:-1,CCTV-7高清(7)
rtp://239.2.1.61:8104
#EXTINF:-1,CCTV-9高清(9)
@imba-tjd
imba-tjd / .Cloud.md
Last active May 18, 2025 16:42
☁️ 一些免费的云资源

  • IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装。PaaS提供语言环境和框架(可以自己选)。SaaS只能使用开发好的软件(卖软件本身,如税务会计、表格文字处理)。BaaS一般类似于非关系数据库,但各家不通用
  • 云服务的特点:零前期成本 & 按需付费 & 弹性(类似于租,可随时多加、退掉;但没有残值)、高可用(放在机房中,不同AZ间水电隔离)

其他人的集合

@a1mersnow
a1mersnow / catch-all-boxes.js
Created March 16, 2019 05:47
catch all boxes in page(this may not work well for fixed or sticky positioned box)
void function () {
const canvas = document.createElement('canvas')
canvas.width = document.documentElement.offsetWidth
canvas.height = document.documentElement.offsetHeight
canvas.style.position = 'absolute'
canvas.style.left = '0'
canvas.style.right = '0'
canvas.style.top = '0'
@sdhzdmzzl
sdhzdmzzl / bj-unicom-iptv.m3u
Last active May 15, 2025 06:08
北京联通iptv列表
#EXTINF:-1,CCTV-1
rtp://239.3.1.1:8000
#EXTINF:-1,CCTV-2
rtp://239.3.1.2:8004
#EXTINF:-1,CCTV-4
rtp://239.3.1.4:8216
#EXTINF:-1,CCTV-7
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active May 16, 2025 01:02
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat