Skip to content

Instantly share code, notes, and snippets.

@stanislaw
stanislaw / Open source requirements managements tools.md
Last active March 18, 2025 15:54
Open source requirements managements tools

Open source requirements management tools

A tool developed to support Software Specification analysis and Testable Requirements definition.

Requirements management using version control.

@codeguy
codeguy / slugify.js
Created September 24, 2013 13:19
Create slug from string in Javascript
function string_to_slug (str) {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
}
@GooRiOn
GooRiOn / setup.md
Last active March 18, 2025 15:46
Git For Win + Windows Terminal Setup
@GrahamM
GrahamM / I2S_MIC_UDP.ino
Last active March 18, 2025 15:45
ESP32 I2S Mic UDP streamer
/**
* ESP32 I2S UDP Streamer
*
* This is influenced by maspetsberger's NoiseLevel at
* https://github.com/maspetsberger/esp32-i2s-mems/blob/master/examples/NoiseLevel/NoiseLevel.ino
*
* @author GrahamM
*/
#include <driver/i2s.h>
@brittanyellich
brittanyellich / new-codebase-discovery-template.md
Last active March 18, 2025 15:45
new-codebase-discovery-template

Overview

How to document a new codebase Use this template to document a new codebase.

Business Logic

A place to record any important logic that you come across that is worth documenting.

Landmarks

Refers to the different landmarks of a codebase to help you navigate around. Where are the API methods defined? Where are interactions with the database?

@Inndy
Inndy / socks5client.py
Last active March 18, 2025 15:44
monkey patch socket module
import os
proxy = os.getenv('socks5_proxy')
if proxy:
host, port = proxy.split(':')
import socks # pip install pysocks
import socket
def create_connection(address, timeout=None, source_address=None):
sock = socks.socksocket()
@gvoze32
gvoze32 / ffmpeg GIF to MP4.MD
Last active March 18, 2025 15:44
Convert animated GIF to MP4 using ffmpeg in terminal.

To convert animation GIF to MP4 by ffmpeg, use the following command

ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4

Description

movflags – This option optimizes the structure of the MP4 file so the browser can load it as quickly as possible.

pix_fmt – MP4 videos store pixels in different formats. We include this option to specify a specific format which has maximum compatibility across all browsers.

@liuran001
liuran001 / config.yaml
Last active March 18, 2025 15:44
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.17-250317
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# https://obdo.cc/meta
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active March 18, 2025 15:44
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@claudianus
claudianus / gulpfile.js
Last active March 18, 2025 15:43
build obfuscated tampermonkey user script and publish to put.re from ES6+ with gulp automator
const gulp = require("gulp")
const babel = require("gulp-babel")
const javascriptObfuscator = require('gulp-javascript-obfuscator')
const rename = require('gulp-rename')
const header = require('gulp-header')
const footer = require('gulp-footer')
const upload = require('gulp-upload')
const package = require('./package.json')