Skip to content

Instantly share code, notes, and snippets.

@aidos-dev
aidos-dev / README.md
Last active January 21, 2025 12:48
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@ricardo-dlc
ricardo-dlc / README.md
Last active January 21, 2025 12:48
Update Jenkins Inside a Docker Container

First identify your image.

$ docker ps --format "{{.ID}}: {{.Image}} {{.Names}}"
3d2fb2ab2ca5: jenkins-docker jenkins-docker_1

Then login into the image as root.

$ docker container exec -u 0 -it jenkins-docker_1 /bin/bash
类别 药品通用名 原研品牌
抗生素类 头孢克洛 希刻劳
头孢呋辛 西力欣
左氧氟沙星 可乐必妥
莫西沙星 拜复乐
阿奇霉素 希舒美
头孢妥仑匹酯 美爱克
抗真菌类 盐酸特比萘芬 兰美抒
奥美拉唑 洛赛克
@shujisado
shujisado / osdn_mirror_contents_url.md
Last active January 21, 2025 12:46
OSDNのミラーコンテンツ 2023/11/19

OSDNのミラーコンテンツ 2023/11/19

OSDNでのリリースファイルやソースコードは全世界の25〜30箇所程の公開ミラーサイトへミラーリングされていた。 現時点ではどれだけ生存しているかは調べていないが、まだそれなりに生きているかと思われる。ただ、日本だとJAIST(ftp.jaist.ac.jp)とIIJ(ftp.iij.ad.jp)しかないようである。

リリースファイル:

OSDNではファイルの公開方法は二種類存在し、それぞれをファイルリリース、ファイルストレージと呼んでいた。前者は最初期からあるリリースシステムであり、後者はrsync等でも利用できる置き放題のストレージシステムである。

@sundowndev
sundowndev / GoogleDorking.md
Last active January 21, 2025 12:46
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@adambernier
adambernier / google_custom_search_up_to_100_results.py
Last active January 21, 2025 12:38
Return up to 100 results from the Google Search API. It increases the start parameter by 10 for each API call, handling the number of results to return automatically. For example, if you request 25 results the function will induce 3 API calls of: 10 results, 10 results, and 5 results.
# Background information:
# For instructions on how to set-up a Google Custom Search engine: https://stackoverflow.com/a/37084643/42346
# More detail about how to specify that it search the entire web here: https://stackoverflow.com/a/11206266/42346
from googleapiclient.discovery import build
from pprint import pprint as pp
import math
NUM_RESULTS = 25
MY_SEARCH = 'why do cats chase their own tails'

Interview Questions

Node.js

Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.

Source: tutorialspoint.com

@PRBorges
PRBorges / diff.ebnf
Last active January 21, 2025 12:34
A grammar for diff output in normal, unified, and git formats
(* EBNF grammar for diff output in normal, unified, and git formats *)
(* Author: Pedro R. Borges *)
(* Read the accompanying article at https://www.prborges.com/2023/grammar-for-diff-output *)
diff = emptyDiff | normalDiff | uniDiff | gitDiff ;
(* 1. Empty diff *)
emptyDiff = "" ;
@dogles
dogles / markovjr_tech_notes.md
Last active January 21, 2025 12:34
Markov Jr. Technical Notes

Introduction

Markov Jr. is an open source C# application that creates procedural content primarily via applying Markov rewrite rules to a 2D or 3D grid. A rewrite rule has an input and output pattern, which essentially specifies what pattern to look for in the existing grid, and what to replace it with.

For example, given a 2D grid, this would replace any white dot with a white cross:

***/*W*/*** :: *W*/WWW/*W*

The left hand side is the rule input, and the right hand side is the output. The / character is used to delimit rows, and space is used to delimit Z-layers (in 3D grids). The input rule above translates to the 2D pattern:

@bluedragon1221
bluedragon1221 / min-linux.md
Last active January 21, 2025 12:34
Create a minimal linux from scratch with initramfs and busybox.

https://www.youtube.com/watch?v=QlzoegSuIzg

The Three Parts

To build a minimal linux distro, we need three parts:

  1. The Kernel
  2. Userspace (busybox)
  3. Bootloader (syslinux)

When the system boots, it loads the kernel, which loads busybox.