Skip to content

Instantly share code, notes, and snippets.

View JamesHopbourn's full-sized avatar

James Hopbourn JamesHopbourn

View GitHub Profile
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF3afN4BEACt8Fx7uEcJifw85hM0BtjXqVPHSmGl5r6Omee/sHnLtJN3hPcT
pNi4XuWCdxzmpPGZP4I1HlgNV3d5Yvo10xMaY3m8AXBshiziL7xo23t05JfSAenL
1DmLNMak40IiCVH3j6wdFvexQJnYTW0UAyK06h5TXnr1HvRJMpxdaoXhi+CN2KG5
b66cnxCL0QIoQ3q2hFrTbFVqPmqBSCV0J1tCdhPsSBchumNjOxt6blhVyqL3q5II
o2ZlvRNdmXh1ZxDoWeOJQAWlb2BKxVxyIdcHy4E3/Kv8kKMbT12+Eix4/vaHFS5J
PLzTXy1o+qooFsxUpIuZb2u+5uaC4NtVor1xc5gAIKBHCk1UlAJLVarS4QDFik7J
gG6JZYaFHf3CGIKAMQisAq9XxRiymT8b6lbvAEmg0tuY7O0yyu3JM4j2SNSERJxu
rdAHSqdiXfN4XDFbCYw+ZwS70g2bwihCOnVy8A1SzMMGhDMIl7tfa98FIR9XSIOB
#!/bin/zsh
fswatch ~/Desktop/1 | while read file
do
rsync -trl --delete ~/Desktop/1 ~/Desktop/2
now=$(date +"%T")
echo "⚠️ $now ${file} synced"
done
#https://imqsc.xyz/2018/10/16/fswatch-and-rsync/
@JamesHopbourn
JamesHopbourn / titleUrlMarkdownClip.js
Last active December 1, 2020 18:04 — forked from bradleybossard/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript: (function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
textarea.style.position = "fixed";
document.body.appendChild(textarea);
textarea.select();
@JamesHopbourn
JamesHopbourn / urlsafari
Created April 25, 2021 08:20 — forked from kshiteesh/urlsafari
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
(*
Export All Safari Tabs in All Open Windows to a Markdown File
July 13, 2015
// SCRIPT PAGE
http://hegde.me/urlsafari
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file
@JamesHopbourn
JamesHopbourn / README.md
Last active May 23, 2023 03:04
今日校园 Hacking

使用方法

  1. 订阅 Surge 模块
https://gist.githubusercontent.com/JamesHopbourn/8ad3cb5e89abb810b0021a3cd3c630a3/raw/TodaySchool.sgmodule
  1. 下载需要的捷径根据提示操作
@JamesHopbourn
JamesHopbourn / douyin.txt
Last active August 15, 2024 02:07
抖音、快手等软件 DNS 域名污染,局域网内屏蔽相关流量
set system static-host-mapping host-name aaid.umeng.com inet 127.0.0.1
set system static-host-mapping host-name abtest-ch.snssdk.com inet 127.0.0.1
set system static-host-mapping host-name activity-aghbwh.awemeughun.com inet 127.0.0.1
set system static-host-mapping host-name ai.login.umeng.com inet 127.0.0.1
set system static-host-mapping host-name api1.kuaishoupay.com inet 127.0.0.1
set system static-host-mapping host-name api3-core-c-lf.amemv.com inet 127.0.0.1
set system static-host-mapping host-name api3-normal-c-lf.amemv.com inet 127.0.0.1
set system static-host-mapping host-name api5-core-c-lf.amemv.com inet 127.0.0.1
set system static-host-mapping host-name api5-normal-c-lf.amemv.com inet 127.0.0.1
set system static-host-mapping host-name api100-core-c333.amemv.com inet 127.0.0.1
@JamesHopbourn
JamesHopbourn / gist:60935e5b6cf97794c788aa3e50bc3d95
Created January 23, 2022 16:59 — forked from r3econ/gist:9953196
Posting JSON file using NSURLSession.
// URL of the endpoint we're going to contact.
NSURL *url = [NSURL URLWithString:@"http://localhost:8080/my.json"];
// Create a simple dictionary with numbers.
NSDictionary *dictionary = @{ @"numbers" : @[@1, @2, @3] };
// Convert the dictionary into JSON data.
NSData *JSONData = [NSJSONSerialization dataWithJSONObject:dictionary
options:0
error:nil];

Java 学习

Java基础

  • 什么是Java
    • 跨平台
    • 性能
    • 应用场景
  • Java的运行环境
    • 环境变量