Skip to content

Instantly share code, notes, and snippets.

View neihousaigaai's full-sized avatar
🤪
love so sweet

Hello World neihousaigaai

🤪
love so sweet
View GitHub Profile
@shane0
shane0 / forms.py
Last active February 14, 2020 08:53
flask-flatpages search
class SearchFlatsForm(Form):
"""search flat pages"""
searchterm = StringField('searchterm',
validators=[DataRequired(),
Length(min=3, max=30),
])
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active July 27, 2025 05:36
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@arieljannai
arieljannai / pycharm.bat
Created January 8, 2017 11:07
Add PyCharm to context menu (right click menu)
@echo off
@rem throw this file in jetbrains installation folder, it takes the last created PyCharm folder (the latest ide update) for the script
FOR /F "delims=" %%i IN ('dir /b /ad-h /t:c /od -filter "PyCharm*"') DO SET a=%%i
SET PyCharmPath=C:\Program Files (x86)\JetBrains\%a%\bin\PyCharm64.exe
echo %PyCharmPath%
echo Adding file entries
@zmwangx
zmwangx / qqvdl
Last active June 8, 2019 08:47
v.qq.com SHD downloader (腾讯超清视频下载) https://github.com/soimort/you-get/issues/1298#issuecomment-236489420
#!/usr/bin/env zsh
print_progress () print -R $'\e[32m'"$*"$'\e[0m' >&2
print_error () print -R $'\e[31m'"Error: $*"$'\e[0m' >&2
# Obvious parameters
vid=f00213kcpwl
defn=shd
# To be extracted from browser's network inspector
@bossjones
bossjones / FooNoOpExample.py
Created March 13, 2016 22:27
Gtk+3/Gdk/PyGobject/PyGI No-Op Function threading example, per suggestion via bewest in IRC ( GIMPNet ). GNOME.
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# From : https://raw.github.com/gist/1132418/7ceda5465a8a148b085c8fe337b855771e88af29/async.py
# source: https://github.com/strycore/pygobject-demos/
# from __future__ import generators
###
import os
import sys
@lopspower
lopspower / README.md
Last active August 20, 2025 14:22
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@rajarsheem
rajarsheem / littlechecker.py
Last active March 23, 2024 18:18
A little code checker tool in python for Java,C,Cpp. Handles compile error, runtime error, accepted, wrong, TLE.
import os, filecmp
codes = {200:'success',404:'file not found',400:'error',408:'timeout'}
def compile(file,lang):
if lang == 'java':
class_file = file[:-4]+"class"
elif lang == 'c':
class_file = file[:-2]
elif lang=='cpp':
@jgravois
jgravois / _webserver.md
Last active August 21, 2025 08:53
a simple guide for getting a local web server set up

Do I have a web server running?


having a web server turned on doesn't necessarily mean you are serving pages on the world wide web. its what allows you to load your own static files (.html, .js etc.) in a browser via http://.

if you're not sure whether or not you have a web server running, no problem! its easy to confirm.

what happens when you visit http://localhost/?

@PurpleBooth
PurpleBooth / README-Template.md
Last active August 21, 2025 15:06
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@soardex
soardex / gist:84c67472dee43a65e344
Created July 3, 2015 08:49
NetEase music.163.com
## from https://gist.github.com/scturtle/5972996
import re
import os
import sys
import md5
import json
import random
import requests