http://mirror1.malwaredomains.com/files/
http://mirror2.malwaredomains.com/files/
// ==UserScript== | |
// @name sinaimg | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match *://*.sinaimg.cn/* | |
// @grant none | |
// ==/UserScript== |
patch: | |
schema_list: | |
- schema: wubi98 # 五笔98 |
for (i in activities()) { | |
activityID = activities()[i]; | |
desktops = desktopsForActivity(activityID) | |
for (j in desktops) { | |
desktop = desktops[j]; | |
desktop.wallpaperPlugin = "org.kde.image"; | |
desktop.wallpaperMode = "Scaled and Cropped"; | |
desktop.currentConfigGroup = new Array("Wallpaper", "org.kde.image", "General"); | |
desktop.writeConfig("Image", "file:///home/zhou/Pictures/Bing/AlpineLarches_ZH-CN10557456981_1920x1200.jpg"); | |
} |
def verify_sign(public_key_loc, signature, data): | |
''' | |
Verifies with a public key from whom the data came that it was indeed | |
signed by their private key | |
param: public_key_loc Path to public key | |
param: signature String signature to be verified | |
return: Boolean. True if the signature is valid; False otherwise. | |
''' | |
from Crypto.PublicKey import RSA | |
from Crypto.Signature import PKCS1_v1_5 |
The fundamental part of ActivityPub federation is the "actor", or in Mastodon terms, the account. Accounts from other servers are queried and saved into the local database to allow sending and receiving interactions. The ResolveRemoteAccountService
class is responsible for this, working in two steps: Converting a human-readable handle like username@domain into URLs to the remote account's resources via Webfinger, and then using the linked remote account's JSON representation to create a local mirror.
Step 1: Webfinger
% curl -i "https://counter.social/.well-known/webfinger?resource=th3j35t3r@counter.social"
HTTP/1.1 200 OK
Date: Thu, 04 Jan 2018 03:29:01 GMT
Content-Type: application/jrd+json; charset=utf-8
Transfer-Encoding: chunked
select event_json.json::json->'content'->>'body' as message, | |
events.room_id, | |
room_stats_state.name, | |
events.sender | |
from events | |
left outer join event_json on | |
events.event_id=event_json.event_id | |
left outer join room_stats_state on | |
room_stats_state.room_id=events.room_id | |
where event_json.json::json->'content'->>'body'<>'' and events.sender='@ACCOUNT_NAME:SERVER.DOM'; |
# first, get the iso from http://releases.ubuntu.com/ | |
# make working dir hierarchy in /tmp (you'll need enough ram for this) | |
sudo mkdir -p /tmp/custom/{_squash,_work,iso,newiso,newlive,project} | |
sudo mount -o loop ~/Downloads/ubuntu-15.10-desktop-amd64.iso /tmp/custom/iso | |
sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_squash | |
sudo mount -t overlay overlay -onoatime,lowerdir=/tmp/custom/_squash,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive | |
# customize the live fs with systemd-nspawn (a better chroot) | |
sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive |
/** | |
* 新浪微博mid与url互转实用工具 | |
* 作者: XiNGRZ (http://weibo.com/xingrz) | |
*/ | |
var WeiboUtil = { | |
// 62进制字典 | |
str62keys: [ | |
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", | |
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", |
// Original rules: https://github.com/coldfix/udiskie/wiki/Permissions | |
// Changes: Added org.freedesktop.udisks2.filesystem-mount-system, as this is used by Dolphin. | |
polkit.addRule(function(action, subject) { | |
var YES = polkit.Result.YES; | |
// NOTE: there must be a comma at the end of each line except for the last: | |
var permission = { | |
// required for udisks1: | |
"org.freedesktop.udisks.filesystem-mount": YES, | |
"org.freedesktop.udisks.luks-unlock": YES, |