Skip to content

Instantly share code, notes, and snippets.

View mashirozx's full-sized avatar
🐕
Just for fun

Mashiro mashirozx

🐕
Just for fun
View GitHub Profile
@FormatFish
FormatFish / upload.py
Created January 2, 2017 11:10
针对sm.ms的图床
#coding=utf-8
import requests
import json
import mimetypes
from PIL import ImageGrab
import datetime
def upload(files):
APIKey = "YOUR API KEY"
format = "json"
@mklasen
mklasen / ajax.upload.js
Created February 11, 2017 12:30
Upload files to WordPress with ajax via REST API
var data = new FormData()
// Add data/files to formdata var
jQuery.ajax({
url: wpApiSettings.root + 'routehere/v1/subroute/save',
type: 'POST',
beforeSend: function(xhr) {
xhr.setRequestHeader( 'X-WP-Nonce', wpApiSettings.nonce );
},
@chrisdhanaraj
chrisdhanaraj / osx.ahk
Last active September 16, 2022 00:02
Autohotkey script to bring OSX keybinds to Windows
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
LCtrl & Tab:: AltTab
!Tab:: Send ^{Tab}
!+Tab:: Send ^+{Tab}
^Space:: Send ^{Esc}
@Ben02
Ben02 / README.md
Last active January 1, 2019 12:44
反向代理 Disqus 评论框。见:https://benwong.cn/tech/Disqus-API.html

利用 Docker 一键部署 Disqus 反向代理到服务器,请看 https://github.com/Ben02/disqus-lite


注意:服务器需有 nginx 和 php 环境。

注意:因为 proxy_pass 里包含变量,所以要到 nginx.conf 里增加一条配置:

http{
@maxivak
maxivak / __upload_file.md
Last active January 30, 2025 19:11
PHP upload file with curl (multipart/form-data)

We want to upload file to a server with POST HTTP request. We will use curl functions.


// data fields for POST request
$fields = array("f1"=>"value1", "another_field2"=>"anothervalue");

// files to upload
$filenames = array("/tmp/1.jpg", "/tmp/2.png");
@CodeMyUI
CodeMyUI / codevember-6-storm.markdown
Created November 9, 2017 09:58
Codevember #6 - storm
@kurlov
kurlov / mkv embed soft subtitles
Created December 16, 2017 23:41
ffmpeg command to add .srt based subtitles to an .mkv file
ffmpeg -i in.mkv -f srt -i in.srt -map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s srt out.mkv
@steven2358
steven2358 / ffmpeg.md
Last active April 21, 2025 02:17
FFmpeg cheat sheet
@xiaostrong
xiaostrong / qqmessage.py
Created February 21, 2018 08:57
QQ空间留言脚本
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import requests
import time
import re
import json
import time
def login():
options = webdriver.ChromeOptions()
@hiepxanh
hiepxanh / THREE Image Transition.markdown
Created April 22, 2018 05:40
THREE Image Transition