Skip to content

Instantly share code, notes, and snippets.

View meoww-bot's full-sized avatar
🐱
meow sucking

meoww-bot meoww-bot

🐱
meow sucking
View GitHub Profile
@meoww-bot
meoww-bot / ffmpeg.md
Created February 21, 2022 13:08 — forked from protrolium/ffmpeg.md
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@meoww-bot
meoww-bot / gist:770559b3671d0bce10d6405ca6185646
Created April 11, 2022 08:51 — forked from wendal/gist:4537679
演示golang转编码 (gb2312 --> utf8)
package main
import (
iconv "github.com/djimenez/iconv-go"
"io/ioutil"
"log"
"net/http"
@meoww-bot
meoww-bot / modern_js.md
Created April 27, 2022 08:14 — forked from gaearon/modern_js.md
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@meoww-bot
meoww-bot / consul.service
Created August 17, 2022 19:20 — forked from yunano/consul.service
/etc/systemd/system/consul.service
[Unit]
Description=consul agent
Requires=network-online.target
After=network-online.target
[Service]
EnvironmentFile=-/etc/sysconfig/consul
Environment=GOMAXPROCS=2
Restart=on-failure
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d
@meoww-bot
meoww-bot / curl.md
Created September 29, 2022 06:52 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@meoww-bot
meoww-bot / install_node_exporter.centos6.sh
Created October 21, 2022 15:56 — forked from dale-c-anderson/install_node_exporter.centos6.sh
Install and configure Prometheus Node Exporter on a CentOS 6 box
#!/bin/bash
# Install Prometheus Node Exporter on CentOS 6.
set -eu
set -o pipefail
set -x
REPOFILE='/etc/yum.repos.d/coprs.ibotty.prometheus-exporters.repo'
INSTALLED=0
@meoww-bot
meoww-bot / cx_oracle.md
Created November 14, 2022 07:54 — forked from kimus/cx_oracle.md
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need:

@meoww-bot
meoww-bot / simplehttpserver.go
Created April 25, 2023 07:01 — forked from cubarco/simplehttpserver.go
This is a golang alternative to the SimpleHTTPServer of Python.
package main
import (
"flag"
"fmt"
"net/http"
)
func main() {
var port string
@meoww-bot
meoww-bot / v1.sh
Last active November 2, 2023 17:37
京东口罩库存监控,v2版本无需登录京东账号
#!/bin/bash
# 需要替换的参数:
# CHAT_ID='-1001325237796' 目标群或者频道ID
# TOKEN="BOT TOKEN" BOT的TOKEN
# Cookie 中的 THOR 可以在登录了京东账号后抓包获得
# 购买地区:
# cityId,townId,countyId 可以在"配送至" - "选择新地址",审查元素,查看对应地区的id
skuid="
100002690344
100002690350
@meoww-bot
meoww-bot / torrent2magnet.py
Created July 11, 2020 06:29
convert torrent to magnet link
import sys
import bencode
import hashlib
import base64
import urllib
def make_magnet_from_file(file) :
with open(file,'r') as f:
torrent = f.read()