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
@steven2358
steven2358 / ffmpeg.md
Last active April 21, 2025 02:17
FFmpeg cheat sheet
@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
@CodeMyUI
CodeMyUI / codevember-6-storm.markdown
Created November 9, 2017 09:58
Codevember #6 - storm
@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");
@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{
@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}
@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 );
},
@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"
@gkhays
gkhays / DrawSineWave.html
Last active March 4, 2025 13:49
Oscillating sine wave, including the steps to figuring out how to plot a sine wave
<!DOCTYPE html>
<html>
<head>
<title>Sine Wave</title>
<script type="text/javascript">
function showAxes(ctx,axes) {
var width = ctx.canvas.width;
var height = ctx.canvas.height;
var xMin = 0;
@tomieric
tomieric / css-filp.css
Created March 21, 2016 01:38
全兼容css水平翻转
/*
* by zhangxinxu
* http://www.zhangxinxu.com/wordpress/2011/05/css%E5%AE%9E%E7%8E%B0%E5%90%84%E4%B8%AA%E6%B5%8F%E8%A7%88%E5%99%A8%E5%85%BC%E5%AE%B9%E7%9A%84%E5%9E%82%E7%9B%B4%E7%BF%BB%E8%BD%AC%E6%B0%B4%E5%B9%B3%E7%BF%BB%E8%BD%AC%E6%95%88%E6%9E%9C/
*/
/*水平翻转*/
.flipx {
-moz-transform:scaleX(-1);
-webkit-transform:scaleX(-1);
-o-transform:scaleX(-1);
transform:scaleX(-1);