Skip to content

Instantly share code, notes, and snippets.

View yongqianme's full-sized avatar

yongqianme yongqianme

View GitHub Profile
@yongqianme
yongqianme / image-and-video.md
Created November 22, 2023 20:46 — forked from Kartones/image-and-video.md
image & video (Imagemagick, ffmpeg, webp...) commands
@yongqianme
yongqianme / seo_sem_guide.md
Created November 22, 2023 20:20 — forked from nicolasdao/seo_sem_guide.md
SEO/SEM guide. Keywords: seo sem ux ttfb noindex robots.txt sitemap robots bundle
@yongqianme
yongqianme / gist:7965d24eee39fe2bcf75ef785f4f0084
Created August 1, 2023 05:43
Delete stripe customers in Bash
#!/bin/bash
# Step 1: Get the JSON list and extract the "id" into an array called "ids"
response=$(curl -G https://api.stripe.com/v1/customers \
-u sk-key: \
-d limit=3)
# Check if the curl command was successful
if [ $? -ne 0 ]; then
echo "Error occurred while fetching data from the API."
@yongqianme
yongqianme / Launch Daemon omniEdge
Last active August 9, 2022 01:00 — forked from codeZoner/com.startup.plist
Launch Daemon Start up with Bash Script with omniEdge
# -w flag permanently adds the plist to the Launch Daemon
sudo launchctl load -w /Library/LaunchDaemons/com.omniedge.plist
# -w flag permanently remove the plist to the Launch Daemon
sudo launchctl unload -w /Library/LaunchDaemons/com.omniedge.plist
You can stop the launchctl process by
sudo launchctl stop /Library/LaunchDaemons/com.omniedge.plist
@yongqianme
yongqianme / docker-install-ubunut.sh
Created March 12, 2020 20:24
bash to install docker on ubuntu
#!/bin/bash
# Install Docker (https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce)
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt-get --assume-yes install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@yongqianme
yongqianme / deploy_flask_lighttpd.py
Created May 5, 2019 04:55 — forked from mahenzon/deploy_flask_lighttpd.py
Flask (Python 3) + flup + Lighttpd project deploy
import os
import stat
import argparse
template_fcgi = '''#!/usr/bin/env python3
from flup.server.fcgi import WSGIServer
from %s import app
class ScriptNameStripper(object):
@yongqianme
yongqianme / ffmpeg.md
Created April 27, 2019 03:33 — forked from dvlden/ffmpeg.md
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@yongqianme
yongqianme / ffmpeg-convert-list
Created October 3, 2018 04:58
ffmpeg command list
#convert webm to mp4
ffmpeg -fflags +genpts -i 1.webm -r 24 1.mp4
@yongqianme
yongqianme / gist:b8f336d695fd39dabe8e873e54c1b610
Created September 9, 2018 16:48
Ruby-passenger-nginx-ubuntu.sh
#!/usr/bin/env bash
apt-get -y update
sudo apt-get -y install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev vim
sudo apt-get -y install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev byobu nginx fail2ban
cd /tmp
byobu-enable
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -L https://get.rvm.io | bash -s stable
sudo usermod -a -G rvm `whoami`
source ~/.rvm/scripts/rvm
@yongqianme
yongqianme / Jekylllistallcatergoriespost
Last active August 29, 2015 14:15
Jekylllistallcatergoriespost
{% for category in site.categories %}
<li>{{ category | first }}({{category | last | size}})</h3>
<ul>
{% for posts in category %}
{% for post in posts %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
{% endfor %}
</ul>
</li>