Skip to content

Instantly share code, notes, and snippets.

@usametov
usametov / topics-search.txt
Created February 16, 2021 01:50
how to search github.com for multiple topics
Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Below is a simple example to query github.com with ecs and go topic tags.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories?q=topic:ecs+topic:go
Response from the github can be rather verbose so lets filter only relavant info such repo url and description.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories\?q\=topic:ecs+topic:go | jq '.items[] | {url:.url, description:.description}'
@progrium
progrium / README.md
Last active July 19, 2025 19:41
Setting up M1 Macs for x86 development with Homebrew

Key Points

  • In general, binaries built just for x86 architecture will automatically be run in x86 mode
  • You can force apps in Rosetta 2 / x86 mode by right-clicking app, click Get Info, check "Open using Rosetta"
  • You can force command-line apps by prefixing with arch -x86_64, for example arch -x86_64 go
  • Running a shell in this mode means you don't have to prefix commands: arch -x86_64 zsh then go or whatever
  • Don't just immediately install Homebrew as usual. It should most likely be installed in x86 mode.

Homebrew

Not all toolchains and libraries properly support M1 arm64 chips just yet. Although

@fuyi
fuyi / airflow-mysql.md
Created December 10, 2020 14:18
Airflow MySQL Meta store performance tuning

Login MySQL with this shell script

 #!/bin/bash
SECRET_VALUE=$(tink-kubectl -n airflow get secrets airflow-credentials -o json)
PASSWORD=$(echo $SECRET_VALUE | jq ."data" | jq ."rootPassword")
CORRECT_PASSWORD=$(echo "$PASSWORD" | sed -e 's/^"//' -e 's/"$//' | base64 -d)
tink-kubectl -n airflow exec -it airflow-mysql-0 bash
mysql -h 127.0.0.1 -P 3306 -u root -p $CORRECT_PASSWORD
use airflow;
@prakshalj0512
prakshalj0512 / webserver_config.py
Last active January 7, 2023 18:17
Airflow Webserver Config for LDAP & RBAC Integration (Anonymous User)
"""
AUTH_ROLE_ADMIN: the role of the bind user (should be Admin)
AUTH_USER_REGISTRATION: boolean for automatically creating users on first log-in
AUTH_USER_REGISTRATION_ROLE: the role which first-time users logging in will be assigned
Possible Values: Admin, Viewer, User, Op, Public
AUTH_LDAP_SERVER: the LDAP server URI
AUTH_LDAP_SEARCH: update with the LDAP path under which you’d like the users to have access to Airflow (e.g. : 'dc=example,dc=com')
@prakshalj0512
prakshalj0512 / webserver_config.py
Last active April 23, 2025 14:11
Airflow Webserver Config for LDAP & RBAC Integration (Bind User)
"""
AUTH_ROLE_ADMIN: the role of the bind user (should be Admin)
AUTH_USER_REGISTRATION: boolean for automatically creating users on first log-in
AUTH_USER_REGISTRATION_ROLE: the role which first-time users logging in will be assigned
Possible Values: Admin, Viewer, User, Op, Public
AUTH_LDAP_SERVER: the LDAP server URI
AUTH_LDAP_SEARCH: update with the LDAP path under which you’d like the users to have access to Airflow. Example: dc=example,dc=com.
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active September 3, 2025 08:23
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@JaeHeyK
JaeHeyK / tutorial.txt
Last active November 3, 2023 05:47
VS Code에서 C로 컴파일하기(MacOS)
(1)VS Code 설치
1. https://code.visualstudio.com/ 에 가셔서 프로그램 다운받아주세요
2. 설치 후에 프로그램을 여시면 왼쪽 아래에 톱니바퀴 모양 있을 텐데, 클릭하면 <확장> 있을 거에요. 그거 클릭해주세요
3. 그럼 왼쪽에 길게 리스트처럼 나올 텐데, 위에 검색창에 "C/C++"라고 입력해주세요!
그럼 Microsoft에서 만든 확장기능이 하나 나올텐데, 설치해주시면 됩니다.
(2) gcc 설치하기
1. Command+스페이스 로 'terminal' 검색 후 terminal 창 열기
2. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@JaeHeyK
JaeHeyK / tasks.json
Created August 17, 2020 01:20
VSCode gcc compile tasks.json
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "gcc build",
"command": "gcc",
"args": [
"${file}",
"-o",
@chrismclennon
chrismclennon / custom_ldap_auth.py
Last active November 11, 2022 14:45
Custom auth backend to support LDAP for API calls
# Install instructions:
# * Place file inside of Airflow path. For example: /usr/local/lib/python3.6/site-packages/airflow/custom/auth/backends/custom_ldap_auth.py
# * In airflow.cfg, reference field api.auth_backend = airflow.custom.auth.backends.custom_ldap_auth
# * Rewrite logic for function `requires_authentication()` to suit your own needs. This implementation checks to see if the
# LDAP user's role is equal to the "owner" field.
from functools import wraps
import base64
from flask import Response, make_response
@Ircama
Ircama / LgMagicRemoteKeys.md
Last active September 6, 2025 21:21
Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

This procedure allows substituting one or both Netflix and Amazon keys of the Magic Remote Control Unit with other apps or TV control menus of the webOS LG TV.

Netflix and Amazon keys can be found just over the Red-Green-Yellow-Blue color buttons of such remote.

Assumption for this procedure is that you accept to uninstall the apps related to the keys to be substituted. Example: if you want to replace the Netflix key, you need to uninstall Netflix (possibly, you are not using Netflix if you do not need such key).

To uninstall Netflix or Amazon Prime, press the Home key of the Magic Remote, select the "LG Content Store" app, press "APP" at the top of the screen, press "My Apps", press the "Rem