Skip to content

Instantly share code, notes, and snippets.

@rromanchuk
rromanchuk / README.md
Last active May 10, 2024 03:28
Building ffmpeg with x265 NEON arm64 cpu acceleration support (Ubuntu LTS, t4g, a1 ec2 family)
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 10, 2024 03:25
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

{
"version": 1,
"snippets": [
{
"version": 1,
"javascript": "const settings \u003d {\\r\\n chatGpt: {\\r\\n \\/\\/ replace with your ChatGPT API key created at https:\\/\\/platform.openai.com\\/api-keys\\r\\n apiKey: \\\u0027ENTER CHATGPT API KEY\\\u0027,\\r\\n\\r\\n \\/\\/ the OpenAI model to use\\r\\n model: \\\u0027gpt-4-turbo\\\u0027,\\r\\n },\\r\\n alsoAsked: {\\r\\n \\/\\/ replace with your AlsoAsked API key created at https:\\/\\/alsoasked.com\\/developer\\/keys\\r\\n apiKey:\\r\\n \\\u0027ENTER ALSOASKED API KEY\\\u0027,\\r\\n\\r\\n \\/\\/ the language to search in\\r\\n language: \\\u0027en\\\u0027,\\r\\n\\r\\n \\/\\/ the region to search in\\r\\n region: \\\u0027gb\\\u0027,\\r\\n\\r\\n \\/\\/ the depth of the search\\r\\n \\/\\/ 2 is the default and returns the smallest number of questions, and costs 1 credit\\r\\n \\/\\/ 3 is the maximum and returns the largest number of questions, but costs 4 credits\\r\\n depth: 2,\\r\\n\\r\\n
@rxaviers
rxaviers / gist:7360908
Last active May 10, 2024 03:24
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ChenyangGao
ChenyangGao / qrcode_cookie_115
Last active May 10, 2024 03:23
115扫码登录,可选择 app,获取 cookie
@klezVirus
klezVirus / EtwStartWebClient.cs
Last active May 10, 2024 03:22
A PoC in C# to enable WebClient Programmatically
using System.Runtime.InteropServices;
using System;
/*
* Simple C# PoC to enable WebClient Service Programmatically
* Based on the C++ version from @tirannido (James Forshaw)
* Twitter: https://twitter.com/tiraniddo
* URL: https://www.tiraniddo.dev/2015/03/starting-webclient-service.html
*
* Compile with:
@terrisgit
terrisgit / LoggingPolicy.js
Last active May 10, 2024 03:20
Express Gateway custom Policy for logging requests
const humanizeDuration = require('humanize-duration');
const Loggers = require('@goodware/log');
const { PassThrough } = require('stream');
const { ulid } = require('ulidx');
/**
* See https://github.com/expressjs/body-parser for more options
*/
const jsonParser = require('express').json({ limit: '10mb' });
@plentz
plentz / nginx.conf
Last active May 10, 2024 03:20
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@PsychedelicShayna
PsychedelicShayna / md5.rs
Last active May 10, 2024 03:18
A condensed, 358 line MD5 implementation for Rust, easy to copy paste into other projects.
pub mod md5 {
use std::convert::TryInto;
use std::fmt::Display;
use std::{fs::File, io::Read};
pub const BLOCK_LENGTH: usize = 64;
pub const DIGEST_LENGTH: usize = 16;
#[rustfmt::skip]
pub const INITIAL_STATE: [u32; 4] = [