Skip to content

Instantly share code, notes, and snippets.

View qb20nh's full-sized avatar
💭
I may be slow to respond.

Yoo Taejong qb20nh

💭
I may be slow to respond.
  • 14:41 (UTC +09:00)
View GitHub Profile
@ciphertxt
ciphertxt / openmsedgeprofilemacos.sh
Created July 13, 2022 18:42
Opens a specific Microsoft Edge profile by name on macOS
# Navigate to the profiles directory
cd ~/Library/Application\ Support/Microsoft\ Edge
# List out the profile directories. Note that the directory name is what is used in the launch command, *not* necessarily the friendly name of the profile you see in Microsoft Edge.app
find ./ -type f -name Preferences
# Let's say "Profile 1" is one of our directories
"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" --profile-directory="Profile 1"
@umbum
umbum / EnumUsingDbCodeTypeHandler-interface.java
Last active November 23, 2021 04:56
MyBatis EnumUsingDbCodeTypeHandler using interface
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Arrays;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedTypes;
@funkyfisch
funkyfisch / migrate-docker-volume.sh
Last active January 16, 2024 12:01
Migrate a docker volume from one host to another
#!/bin/bash
# Environment check
# If migrating from localhost, set this to localhost
if [[ ! $SOURCE_HOST_ADDRESS ]]
then
echo "Please set the current host address in SOURCE_HOST_ADDRESS"
exit 1
fi
@kthy
kthy / UnicodeData.csv
Last active February 1, 2022 15:17
UnicodeData.txt initial lines and field descriptions - full file at <http://www.unicode.org/Public/UNIDATA/UnicodeData.txt>
CodePoint CharacterName GeneralCategory CanonicalCombiningClasses BidirectionalCategory CharacterDecompositionMapping DecimalDigitValue DigitValue NumericValue Mirrored Unicode 1.0 Name ISO-10646CommentField UppercaseMapping LowercaseMapping TitlecaseMapping
0000 <control> Cc 0 BN N NULL
0001 <control> Cc 0 BN N START OF HEADING
0002 <control> Cc 0 BN N START OF TEXT
0003 <control> Cc 0 BN N END OF TEXT
0004 <control> Cc 0 BN N END OF TRANSMISSION
0005 <control> Cc 0 BN N ENQUIRY
0006 <control> Cc 0 BN N ACKNOWLEDGE
0007 <control> Cc 0 BN N BELL
0008 <control> Cc 0 BN N BACKSPACE
@bseib
bseib / README.md
Last active November 24, 2023 17:08
Webpack + JSP

Webpack + JSP

These snippets were created after reading the following article on how to use webpack to build code bundles for individual JSP pages, and specifically how to get those JSP pages to refer to the correct filename + hash.

https://medium.com/@jsilvax/introducing-webpack-into-an-existing-java-based-web-app-ff53f14d37ec

There was no actual code, but the description of the approach was enough to put something together. jsilvax just posted some code here: https://medium.com/p/510d859b9f36/responses/show

class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('RichText Widget Demo'),
),
body: Center(
child: ListView(
padding: const EdgeInsets.all(20.0),
@swyxio
swyxio / 1.md
Last active October 1, 2024 04:34
Learn In Public - 7 opinions for your tech career

2019 update: this essay has been updated on my personal site, together with a followup on how to get started

2020 update: I'm now writing a book with updated versions of all these essays and 35 other chapters!!!!

1. Learn in public

If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.

You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos

@seanh
seanh / html_tags_you_can_use_on_github.md
Last active November 1, 2024 16:02
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai

@BoGnY
BoGnY / README.md
Last active November 13, 2024 22:02
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify
@ph4r05
ph4r05 / ct_array_compare.java
Last active November 11, 2021 09:13
Constant time array equality check in java
package ct;
public class CT {
/**
* Constant time array equals check.
* If the lengths do not match the function returns false immediately.
* @param a array A
* @param b array B
* @return true if arrays are equal on defined intervals