Skip to content

Instantly share code, notes, and snippets.

@philoskim
philoskim / vscode-on-ubuntu.adoc
Last active May 13, 2024 05:05
Ubuntu에서 Visual Studio Code 한글 입력 안되는 현상 해결법

Ubuntu에서 Visual Studio Code 한글 입력 안되는 현상 해결법

Ubuntu 19.10에서 Visual Studio Code 사용 중 한영 전환키를 누르고 한글을 입력하려 했더니, 한글 입력이 안되고 영어만 계속 입력되는 현상을 발견했다. 그래서 인터넷을 검색해 봤더니 snap 형식의 Visual Studio Code를 설치한 경우에, Ubuntu의 입력기인 IBus와 충돌해서 일어나는 현상이라고 한다. 그런데 .deb 형식의 Visual Studio Code를 설치한 경우에는 그런 문제가 없다는 사실을 알게 되어, 설치해 봤더니 한글 입력이 정상적으로 이루어지는 것을 확인했다. 그래서 같은 문제를 겪는 사람들을 위해 이 해결법을 공유하고자 한다.

  • 먼저 이미 설치되어 있는 snap 형식의 Visual Studio Code를 제거한다.

@cantbewong
cantbewong / UbuntuOnDell.md
Last active March 7, 2021 11:17
How to install Ubuntu on a Dell laptop

Supported Models

Hundreds of Dell laptops are certified to run Ubuntu.

Certified laptop list

If you laptop is not on the list, or has been certified only on a backlevel version, this does not mean that it can't run Ubuntu, or can't run a newer version than the one listed as certified.

You can boot from the install media and choose the Try Ubuntu option to evaluate compatibility of a release with your laptop.

@KodrAus
KodrAus / Profile Rust on Linux.md
Last active November 14, 2023 17:19
Profiling Rust Applications

Profiling performance

Using perf:

$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg

NOTE: See @GabrielMajeri's comments below about the -g option.

@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@stevenhaddox
stevenhaddox / ds215j_provisioner.md
Last active June 16, 2018 08:35
Bootstrap Synology DS215j DSM 5.x provisioner steps

Boostrap the Synology DS215j with optware, ipkg, and sudo

Inspired mostly from the Bootstrap DS215j blog post

Download & Install ipkg in a persistent manner

# Create a directory that won't get nuked during DSM security updates
mkdir /volume1/@optware
cd /volume1/@optware
public <T> T streamQuery(String sql, Function<Stream<SqlRowSet>, ? extends T> streamer, Object... args) {
return jdbcTemplate.query(sql, resultSet -> {
final SqlRowSet rowSet = new ResultSetWrappingSqlRowSet(resultSet);
final boolean parallel = false;
// The ResultSet API has a slight impedance mismatch with Iterators, so this conditional
// simply returns an empty iterator if there are no results
if (!rowSet.next()) {
return streamer.apply(StreamSupport.stream(Spliterators.emptySpliterator(), parallel));
}
@aidanhs
aidanhs / gist:5ac9088ca0f6bdd4a370
Last active March 19, 2024 16:01
Rust binary tree worked example

PLEASE DON'T USE THIS GUIDE

It's over 9 years old (as of 2024-02-18), there are many better guides! You might like https://rust-unofficial.github.io/too-many-lists/

% Let's build a binary tree!

Let's build a binary tree of strings in Rust. To recap, each node in a binary tree:

  1. must have a value
@ekristen
ekristen / check_docker_container.sh
Last active January 16, 2024 16:15
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# edit all commit messages
git rebase -i --root
# clone all your repos with gh cli tool
gh repo list --json name -q '.[].name' | xargs -n1 gh repo clone
@jakebellacera
jakebellacera / how-to-install-memcache-on-mamp-2.md
Last active July 4, 2021 16:09
How To Install Memcache on MAMP 2

How To Install Memcache on MAMP 2

Note: This is an old guide and may not work for newer versions of macOS. Please see comments below for additional steps.

  1. Install memcached. I'd suggest using homebrew. brew install memcached
  2. Select your desired version of PHP that you'd like to use in MAMP. This dropdown is located in the PHP tab in MAMP PRO.
  3. Visit the Downloads Page on php.net and download the source code. If your release isn't listed, visit the Releases page.
  4. Extract the source into /Applications/MAMP/bin/php/[php version folder]/include/php.
  5. /Applications/MAMP/bin/php/[php version folder]/include/php/configure
  6. /Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache.