Skip to content

Instantly share code, notes, and snippets.

@lleyton
lleyton / translation.md
Last active April 16, 2025 06:35
(ENG) Open Source Business Challenges and Reality, Rui Ueyama

Open Source Business Challenges and Reality

Original Japanese note here.

Original Author: Rui Ueyama (creator of the mold linker)

Translated by @windowsboy111

Minimally edited by @lleyton

@mamiu
mamiu / K3D_EXEC_AS_ROOT_INTO_CONTAINER.md
Created October 5, 2020 03:45
k3d exec as root user into pod / container

k3d exec as root user into pod / container

Let's assume we have a pod called nginx running in the namespace nginx-test.

kubectl create namespace nginx-test
kubectl run nginx --image=nginx -n nginx-test

1. Check if the current cluster is a k3d cluster

$ cat /etc/clickhouse-server/conf.d/clusters.xml
<?xml version="1.0" ?>
<yandex>
<remote_servers>
<xxx>
<shard>
<replica> <host>h1</host> <port>9000</port></replica>
</shard>
....
</xxx>
@RollingStar
RollingStar / beets_config.yaml
Created May 19, 2020 23:57
beets_config.yaml
# don't copy paste this into your config. It's tailored to me and I haven't really stress-tested it outside of my own use. Also, I was mostly using this in 2017-2019 and features may have changed.
# Some plugins have been retired and I haven't migrated yet. copyartifacts is the best example of this.
# Just use this as a starting point to learn about advanced, undocumented/poorly-documented features of beets.
directory: e:\Music\
library: e:\Music\beetslibrary.bib
#copyartifactspy3 chroma scrub
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active April 14, 2025 11:50
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@omissis
omissis / shorturl_test.go
Last active December 25, 2024 10:00
go table tests example
package shorturl_test
import (
"fmt"
"github.com/omissis/ristretto/internal/domain/shorturl"
"github.com/omissis/ristretto/internal/test/mock"
"reflect"
"testing"
)
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active April 9, 2025 13:42
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@park-brian
park-brian / AdvancedWindowSnap.ahk
Last active February 21, 2025 03:47 — forked from AWMooreCO/AdvancedWindowSnap.ahk
Advanced Window Snap is a script for AutoHotKey that expands upon Windows built-in window-snapping hotkeys.
/**
* Advanced Window Snap
* Snaps the active window to a position within a user-defined grid.
*
* @author Andrew Moore <[email protected]>
* @contributor jballi
* @contributor park-brian
* @contributor shinywong
* @version 1.2
*/
@whoisryosuke
whoisryosuke / nextjs-hoc-authorization.js
Created June 26, 2018 22:24
ReactJS - NextJS - A HOC for wrapping NextJS pages in an authentication check. Checks for getInitialProps on the child component and runs it, so you still get SSR from the page. Also includes a user agent for Material UI.
import React, {Component} from 'react'
import Router from 'next/router'
import AuthService from './AuthService'
export default function withAuth(AuthComponent) {
const Auth = new AuthService('http://localhost')
return class Authenticated extends Component {
static async getInitialProps(ctx) {
// Ensures material-ui renders the correct css prefixes server-side
@ravibhure
ravibhure / git_rebase.md
Last active April 11, 2025 09:30
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream