Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

mbarkhau / sublime_devbuild.py
Last active September 3, 2025 19:49
sublime_devbuild.py
#!/usr/bin/env python3
"""A sublime-text build script, to do the right thing?.
This script takes the currently open file as a
reference point and uses it to determine which commands
to run. This means that you don't have to select a build
commands when switching between projects, the fact that
you have a different file open is enough to indicate
which build you want to run.
Lozus2008 / Account-maneger-Ugphone.user.js
Last active September 3, 2025 19:46
Account-maneger-Ugphone
// ==UserScript==
// @name tiện ích Ugphone
// @namespace ugphone-account-manager
// @version 2.1.0
// @description Fix duplicate accounts on reload. Hanami-style bubble, transform drag, dropdown, import .txt, settings saved.
// @match https://www.ugphone.com/toc-portal/*
// @grant GM.setValue
// @grant GM.getValue
// @grant GM.setClipboard
// @run-at document-end
/* The world's smallest Brainfuck interpreter in C, by Kang Seonghoon
* http://j.mearie.org/post/1181041789/brainfuck-interpreter-in-2-lines-of-c */
s[99],*r=s,*d,c;main(a,b){char*v=1[d=b];for(;c=*v++%93;)for(b=c&2,b=c%7?a&&(c&17
?c&1?(*r+=b-1):(r+=b-1):syscall(4-!b,b,r,1),0):v;b&&c|a**r;v=d)main(!c,&a);d=v;}
0xjac / private_fork.md
Last active September 3, 2025 19:41
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

endolith / Has weird right-to-left characters.txt
Last active September 3, 2025 19:32
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ ̳כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×ばつ
٩(̾くろまる̮̮̃̾•̃̾)۶
tykurtz / grokking_to_leetcode.md
Last active September 3, 2025 19:31
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

sindresorhus / esm-package.md
Last active September 3, 2025 19:24
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(...) from CommonJS instead of require(...).
  3. Stay on the existing version of the package until you can move to ESM.
simonbs / View+ErrorAlert.swift
Created September 3, 2025 18:44
SwiftUI view modifier for presenting an alert when an error binding has a value.
import SwiftUI
public extension View {
func alert<Message: View, Actions: View>(
_ title: LocalizedStringResource,
presenting error: Binding<Error?>,
@ViewBuilder message: @escaping (Error) -> Message,
@ViewBuilder actions: @escaping () -> Actions
) -> some View {
modifier(
NewerOlder

AltStyle によって変換されたページ (->オリジナル) /