Skip to content

Instantly share code, notes, and snippets.

@qoomon
qoomon / conventional_commit_messages.md
Last active May 16, 2024 04:40
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@m4rtinpf
m4rtinpf / test-ci.sh
Created May 10, 2024 02:44
Record screen for reactivecircus/android-emulator-runner gh action
#!/bin/sh
set -x
echo "Starting the screen recording..."
adb shell "screenrecord --bugreport /data/local/tmp/testRecording.mp4 & echo \$! > /data/local/tmp/screenrecord_pid.txt" &
set +e
npm run test
TEST_STATUS=$?
echo "Test run completed with status $TEST_STATUS"
adb shell "kill -2 \$(cat /data/local/tmp/screenrecord_pid.txt)"
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 16, 2024 04:35
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

@tittietime
tittietime / functions.php
Created April 18, 2018 12:55
Obfuscated Sendy Code
<?php
// sendy/includes/functions.php
${"GLOBALS"}["ndcpdwgqk"]="textToDelete";
${"GLOBALS"}["ickwblj"]="string";
${"GLOBALS"}["xvhyjog"]="endPos";
${"GLOBALS"}["vxtvexpxdsk"]="end";
${"GLOBALS"}["kwrbitnoko"]="beginningPos";
${"GLOBALS"}["eesqiwndnuyk"]="i";
${"GLOBALS"}["tbiuhlfbdi"]="minlength";
${"GLOBALS"}["qyyjbkrkekx"]="length";
@lucis
lucis / pushingToRepos.ts
Created December 27, 2019 02:27
Creating repositories and pushing files to them using @octokit/rest (GitHub API)
import Octokit from '@octokit/rest'
import glob from 'globby'
import path from 'path'
import { readFile } from 'fs-extra'
const main = async () => {
// There are other ways to authenticate, check https://developer.github.com/v3/#authentication
const octo = new Octokit({
auth: process.env.PERSONAL_ACESSS_TOKEN,
})
@anhtran
anhtran / unicode_utils.py
Created April 18, 2018 05:41
Hàm số Chuyển đổi chuỗi Unicode Tổ Hợp sang Unicode Dựng Sẵn trong Python 3
def compound_unicode(unicode_str):
"""
Chuyển đổi chuỗi Unicode Tổ Hợp sang Unicode Dựng Sẵn
Edited from: `https://gist.github.com/redphx/9320735`
"""
unicode_str = unicode_str.replace("\u0065\u0309", "\u1EBB") # ẻ
unicode_str = unicode_str.replace("\u0065\u0301", "\u00E9") # é
unicode_str = unicode_str.replace("\u0065\u0300", "\u00E8") # è
unicode_str = unicode_str.replace("\u0065\u0323", "\u1EB9") # ẹ
unicode_str = unicode_str.replace("\u0065\u0303", "\u1EBD") # ẽ
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
#include <stdarg.h>
#include <limits.h>
#define cast(t,p) ((t)(p))
#define szof(a) ((int)sizeof(a))
@vurtun
vurtun / math.c
Last active May 16, 2024 04:17
Linear Algebra
#include <math.h>
#define op(r,e,a,p,b,i,s) ((r) e (a) p ((b) i (s)))
#define lerp(r,a,b,t) ((r)=(a)+(t)*((b)-(a)))
#define rad(x) ((x)*3.141592653f/180.0f)
#define op3(r,e,a,p,b,i,s)\
do{op((r)[0],e,(a)[0],p,(b)[0],i,s), op((r)[1],e,(a)[1],p,(b)[1],i,s),\
op((r)[2],e,(a)[2],p,(b)[2],i,s);} while(0)
#define op3s(r,e,a,p,s)\
do{op((r)[0],e,(0),+,(a)[0],p,s), op((r)[1],e,(0),+,(a)[1],p,s),\
@masa7351
masa7351 / ide_shortcut.md
Last active May 16, 2024 04:15
Visual Studio CodeとIntelliJのショートカット対応表

テキストエディター

目的 Visual Studio Code IntelliJ 補足
行複製 Option + Shift + ↑ or ↓ Command + D Option + Shift + ↑ or ↓はIntelliJでは行入れ替えのショートカットキー
行削除 Command + Shift + K
Command + X ※
※ Clipbordに登録されるので、Command + Vで貼り付けできる
Command + Delete
行追加※行末にいない状態で追加 Command + EnterCommand + Shift + Enter ※※ Shiftをつけてると、上に行が追加される Shif
@claughinghouse
claughinghouse / functions_src_auth.ts
Created November 28, 2023 19:32
SvelteKit and SST Auth
# This file is in the sveltekit parent directory and is a seperate stack for SST.
import { Account } from "@rebut/core/account";
import { Config } from "sst/node/config";
import { AuthHandler, GoogleAdapter } from "sst/node/future/auth";
import { sessions } from "./sessions";
export const handler = AuthHandler({
sessions,
providers: {