Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@valeriansaliou
valeriansaliou / routeros_configuration_orange.txt
Last active April 23, 2024 09:02
RouterOS / MikroTik router configuration export to connect to the Orange/Sosh Livebox 4 fiber ONT (IPv4 + IPv6)
# jan/13/2020 08:34:56 by RouterOS 6.46.1
#
# notes: \
# - wan to orange ont on ether1; \
# - lan to ap/switch on ether2; \
# - ipv4 + ipv6 w/ fw rules; \
# - using routeros dns cache for lan, proxying to the dns servers advertised by orange's dhcpv4 server; \
# - direct plug your computer w/ wireshark to your livebox 4 fiber ethernet port and reboot it, inspect the dhcpv4 packat in wireshark and extract the value of 'authsend'; \
# - the cos tag needs to be set to 6 to be accepted by the ont dhcpv4/v6 server (from default 0), this may not be required depending on your ont, check for the cos flag sent by your livebox 4 when sniffing its traffic
#
@sindresorhus
sindresorhus / esm-package.md
Last active April 23, 2024 09:02
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@huazhanshen
huazhanshen / BT 磁力搜索引擎索引
Created May 30, 2018 05:39
BT 磁力搜索引擎索引
btkitty
知名的BT磁力搜索,资源很多
http://cnbtkitty.com/
备用域名:http://btkitty.fyi/
idope.se
资源丰富的BT磁力搜索,并且大多数速度下载速度很快
https://idope.se/
@jdhao
jdhao / Sublime_text_regex_cheat_sheet.md
Last active April 23, 2024 08:58
Sublime Text regular expression cheat sheet, you can also find it in https://jdhao.github.io/2019/02/28/sublime_text_regex_cheat_sheet/

Special characters

expression Description
. Match any character
^ Match line begin
$ Match line end
* Match previous RE 0 or more times greedily
*? Match previous RE 0 or more times non-greedily
+ Match previous RE 1 or more times greedily
@ax3l
ax3l / symbols_cpp.md
Last active April 23, 2024 08:57
Symbol Visibility 101 by Boris Staletic @bstaletic

Visible Symbols in C++ Projects

Intro

This is a spontaneous and verbatime log of a conversion with Boris Staletic @bstaletic from March, 24th 2018 on the pybind11 gitter. Thank you so much, Boris!

To confuse future readers, we decided to write down the discussion and I added typos and unnecessarily long sentences.

The issue came up with linking a CMake (library) target into a pybind11 module (in openPMD-api).

@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@pahud
pahud / check_spot_price_now.md
Created August 10, 2016 08:10
check current spot price with aws-cli
$ aws --region=ap-northeast-2 ec2 describe-spot-price-history --instance-types c4.large --start-time=$(date +%s) --product-descriptions="Linux/UNIX" --query 'SpotPriceHistory[*].{az:AvailabilityZone, price:SpotPrice}'
[
    {
        "price": "0.024900", 
        "az": "ap-northeast-2a"
    }, 
 {
@lopspower
lopspower / README.md
Last active April 23, 2024 08:52
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@krisbolton
krisbolton / fix-USB-showing-up-as-two-partitions.md
Last active April 23, 2024 08:50
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.