Skip to content

Instantly share code, notes, and snippets.

@trxcllnt
trxcllnt / config.yml
Created June 7, 2022 02:35
basic `clangd` C/C++/CUDA config
# Apply this config conditionally to all C files
If:
PathMatch: .*\.(c|h)$
CompileFlags:
Compiler: /usr/bin/gcc
---
# Apply this config conditionally to all C++ files
If:
@cseeman
cseeman / markdown_examples.md
Created September 15, 2023 16:48
Markdown for info panel/warning box

Examples for how to create your own info panel, warning box and other decent looking notification in GitHub markdown.

All the boxes are single/two cell tables or two row tables.

Warning box

❗ You have to read about this
@romainl
romainl / vanilla-linter.md
Last active May 4, 2024 09:45
Linting your code, the vanilla way

Linting your code, the vanilla way

You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.

Defining makeprg

autocmd FileType <filetype> setlocal makeprg=<external command>

This autocommand tells Vim to use <external command> when invoking :make % in a <filetype> buffer. You can add as many similar lines as needed for other languages.

@DrJume
DrJume / lancache_fritzbox.md
Last active May 4, 2024 09:39
Using lancache with a FritzBox

Using lancache with a FritzBox is not very straight forward:

  1. You need to have access to the DNS settings in the FritzBox web interface. Some providers disable this setting to force their customers with specific settings, like their own (mostly slow) DNS servers.
  2. Set both DNS server entries to your local IP address, on which the lancache is accessable.
  3. The FritzBox has a DNS rebind protection. To disable this for the hostnames, which are used for the lancache, you need to specify them as a list format in the web interface.

All the hostnames can be found at uklans/cache-domains. Download the repo and switch into the directory.

@trietptm
trietptm / CTFs.md
Created June 30, 2020 07:39
CTFサイト集。デザイン確認のためのテスト用。

CTFs

⚠️このページはデザイン比較のためのページです。メンテナンス予定はありません。本体はこちら

ほとんどのCTF情報はCTF Timeに記載されている。 jeopardy方式のみ。チェックボックスは履修済みかどうか。

常設CTF

初心者向け

Transparent Restaurant Backend

In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.

Description

In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:

  • low: the cheapest
  • medium: moderate
@rssnyder
rssnyder / oracle-cloud-free-tier-guide.md
Last active May 4, 2024 09:35
oracle-cloud-free-tier-guide

how to leverage oracle's temping offers

free tier limits

The limits of the free tier say that you can create up to 4 instances.

  • x2 x86 instances (2core/1g)
  • x2 ampere instances (with 4core/24g spread between them)
  • 200GB total boot volume space across all intances (minimum of 50G per instance)

create your account

@MikyPo
MikyPo / wb_api_sales.py
Created October 5, 2023 19:46
Выгрузка информации через API Wildberries о продажах
import requests
import json
import pandas as pd
import datetime
from datetime import timedelta
import locale
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
# Читаем token
@npofopr
npofopr / DNS prefetching preconnect
Last active May 4, 2024 09:33
Common Prefetch Links
<!-- DNS preconnect -->
<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="preconnect" href="//ajax.googleapis.com">
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
<link rel="dns-prefetch" href="https://use.fontawesome.com">
<link rel="preconnect" href="https://use.fontawesome.com" crossorigin>
<link rel="preconnect" href="//cdnjs.cloudflare.com">
<link rel="preconnect" href="//www.googletagmanager.com">
<link rel="preconnect" href="//www.google-analytics.com">
@GuillaumeDua
GuillaumeDua / Concept-based polymorphism in modern Cpp.md
Last active May 4, 2024 09:30
Concept-based polymorphism in modern C++

Concept-based polymorphism in modern C++

Date 05-05-2021 - 10-17-2023
Revision R3
Author Guillaume Dua
Reviewers Loïc Joly, Antoine Morrier