Skip to content

Instantly share code, notes, and snippets.

@crazyguitar
crazyguitar / dns.md
Last active September 24, 2023 12:10
learn dns hard way

Domain Name Server (DNS)

Concept

  1. Two type of DNS network activities:
    1. lookup: DNS client queries a DNS server for information
    2. zone transfers: DNS server (the secondary server) requests from another DNS server (the primary server)
  2. DNS lookups are usualy executed usin UDP. (If some of data is lost in transit by UDP, the lookup will be redone using TCP)
  3. DNS sever uses well-known port 53 (UDP/TCP)
  4. Proxying characteristics of DNS:
@InNoHurryToCode
InNoHurryToCode / ClangOnWindows.md
Last active April 28, 2024 15:10
How to install clang on windows using the visual studio build tools

Clang on Windows (VS 2017 build tools)

There are plenty of tutorials online on how to install clang on windows with visual studioIDE and MinGW. However, there are none on clang with visual studio build tools.

Requirements:

  • 64-bit Windows 7 SP1 or newer with the latest updates installed
  • 6 GB of free space on the partition where Windows is installed
  • internet connection (for installation only)

1. Install VS 2017 build tools

%VS2017BuildToolsDir% = installation directory of VS 2017 build tools

@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active May 11, 2024 14:01
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \
@stefancocora
stefancocora / vpn-openconnect-connect-to-cisco-anyconnect.md
Created September 25, 2017 08:48
Split tunneling with openconnect - A guide on how to use openconnect to establish a vpn connection to an enterprise cisco anyconnect vpn endpoint with client side routing.

Introduction

The purpose of this short howto is to show you how to:

  • use openconnect [1] to connect to an enterprise cisco anyconnect endpoint
  • whilst minimizing the amount of traffic that your route through the vpn connection

Usually VPN administrators will puth the default route to the users, so that all user traffic is routed through the vpn connection. This is to address the various security concerns around compromised user computers bridging external internet traffic into the secure VPN network.

While the VPN administrator can push routes to the clients, the client can ignore these default routes and establish client side routing so that only the required A.B.C.D/E network is routed through the VPN. All other traffic will still use the clients default route and default outbound internet connection.

@Azoy
Azoy / install-swift-ubuntu.md
Last active December 9, 2022 03:42
Guide on how to install Swift on Ubuntu

Install Swift on Ubuntu

Requirements

  1. Ubuntu 14.04, 16.04, or 16.10

Step 1 - Dependencies

  1. Open up terminal
  2. Install core deps: sudo apt-get install clang libicu-dev git

Step 1.1 - Ubuntu 14.04 Clang

@machinekoder
machinekoder / Emacs.kms
Last active September 28, 2023 04:04
Emacs keys for Qt Creator
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE KeyboardMappingScheme>
<!-- Written by Qt Creator 4.2.1, 2017-03-27T21:24:06. -->
<mapping>
<shortcut id="CppTools.OpenHeaderSourceInNextSplit">
<key value="Ctrl+E, F4"/>
</shortcut>
<shortcut id="CppTools.SwitchHeaderSource">
<key value="F4"/>
</shortcut>
@adricasti
adricasti / Readme.md
Last active June 24, 2020 18:59
nRF52 Toolchain Setup in Mac OS X

Equipment

  • MacOS Mojave 10.14.4
  • MacBook Pro (Retina, 13-inch, Late 2012)
  • nRF52-DK (PCA10040)

Toolchain Setup

  1. Install GCC
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.