Skip to content

Instantly share code, notes, and snippets.

View codebymikey's full-sized avatar

codebymikey codebymikey

View GitHub Profile
@ld100
ld100 / ArchLinuxWSL2.md
Last active September 14, 2025 12:21
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@me-vlad
me-vlad / Ansible_Vault_passwordstore.md
Last active July 28, 2021 19:01
Ansible Vault passwords and ansible_become_pass variable stored in pass (https://www.passwordstore.org) or gopass

Ansible Vault passwords and ansible_become_pass variable stored in pass https://www.passwordstore.org or gopass https://www.gopass.pw

ansible_become_pass variable in pass/gopass

Create encrypted password file with pass or gopass

pass insert ansible/test or gopass insert ansible/test

Now you can access become password stored in ansible/test using lookup plugin passwordstore

@x-yuri
x-yuri / docker-compose-anonymous.yml
Last active April 28, 2024 01:46
docker: migrate volume data #pg #docker
version: '3'
services:
s1:
image: postgres:12
container_name: ${prefix}_compose_anonymous
ports:
- $pg_port:5432
@HatScripts
HatScripts / codepen_jokes.md
Last active October 18, 2025 06:16
Programming jokes/one-liners found on CodePen
  • A Pen is worth a thousand docs.
  • Be the developer your linter thinks you are.
  • How do you comfort a JavaScript bug? You console it!
  • How would you React if I said I love Vue?
  • If a groundhog inspects their Web Component, do they see their Shadow DOM?
  • If you get tired, be like an AJAX request and REST.
  • If you want to flex your skills and go off the grid, try coding a layout with float.
  • Keep friends close and formatters closer.
  • Keep the <main> thing the <main> thing.
  • Knock knock! Race condition. Who's there?
@alganet
alganet / hers.sh
Last active July 20, 2025 04:57
Fast and portable mouse/keyboard terminal capture (zsh,ksh,mksh,bash on Windows+WSL, Linux or Mac OS)
#!/bin/sh
# Quick run: bash -c "$(curl -L https://git.io/fjToH)"
# CTRL+W to exit
set -euf
unsetopt FLOW_CONTROL GLOB NO_MATCH NO_SH_WORD_SPLIT NO_PROMPT_SUBST 2>/dev/null || :
write ()
{
@guanguans
guanguans / xdebug.ini
Last active November 18, 2021 10:25
xdebug.ini
;laradock
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
; xdebug.remote_host=dockerhost
; xdebug.remote_host=docker.for.mac.localhost 此处有坑,这是以前的写法,现在用下条
xdebug.remote_host=docker.for.mac.host.internal
xdebug.remote_connect_back=0
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
@igorbenic
igorbenic / allowedBlocks.js
Last active July 20, 2020 21:39
How to enable Inner Blocks in your Gutenberg Block | https://ibenic.com/enable-inner-blocks-gutenberg
<InnerBlocks allowedBlocks={ [ 'core/image', 'core/paragraph' ] } />
@superjose
superjose / .gitlab-ci.yml
Last active July 24, 2025 23:21
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@zgordon
zgordon / gutenberg-webpack-config-with-externals.js
Last active November 19, 2021 12:25
An example of a webpack config for Gutenberg block development using externals
/**
* External dependencies
*/
// Load webpack for use of certain webpack tools and methods
const webpack = require( 'webpack' );
// For extracting CSS (and SASS) into separate files
const ExtractTextPlugin = require( 'extract-text-webpack-plugin' );
// Main CSS loader for everything but blocks..
@dikiaap
dikiaap / git-io-custom-url.md
Last active September 8, 2025 00:26
git.io custom URL

Update: As of 11 January 2022, git.io no longer accepts new URLs.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com