Skip to content

Instantly share code, notes, and snippets.

@ThePlenkov
ThePlenkov / boot.sh
Last active May 7, 2024 16:39
Resolve WSL DNS automatically
#!/bin/bash
# Remove existing "nameserver" lines from /etc/resolv.conf
sed -i '/nameserver/d' /etc/resolv.conf
# Run the PowerShell command to generate "nameserver" lines and append to /etc/resolv.conf
# we use full path here to support boot command with root user
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command '(Get-DnsClientServerAddress -AddressFamily IPv4).ServerAddresses | ForEach-Object { "nameserver $_" }' | tr -d '\r'| tee -a /etc/resolv.conf > /dev/null
@davidfowl
davidfowl / dotnetlayout.md
Last active May 7, 2024 16:39
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
" To get a list of Actions run `:actionlist `
" let mapleader = ','
" let mapleader = " "
let mapleader = "\<SPACE>"
set ignorecase smartcase
set NERDTree
set hlsearch
set showmode
set scrolloff=5
@don
don / hexStringToArrayBuffer.js
Created May 3, 2018 17:54
Convert hex string to ArrayBuffer
/**
* Convert a hex string to an ArrayBuffer.
*
* @param {string} hexString - hex representation of bytes
* @return {ArrayBuffer} - The bytes in an ArrayBuffer.
*/
function hexStringToArrayBuffer(hexString) {
// remove the leading 0x
hexString = hexString.replace(/^0x/, '');
@thomaslevesque
thomaslevesque / ThemeInfo.cs
Created September 6, 2012 08:33
Get information about current Windows theme in C#
public class ThemeInfo
{
private readonly string _themeName;
private readonly string _themeColor;
private readonly string _themeSize;
private readonly string _themeFileName;
public ThemeInfo(string name, string fileName, string color, string size)
{
_themeName = name;
@Dakedres
Dakedres / README.md
Last active May 7, 2024 16:35
A Windows 95/98 styled scrollbar for https://windows93.net

Install

Please note, this stylesheet may not work on all browsers, as the CSS scrollbar API is not standardized.

1.1.0

  • Made the checkerboard pattern translucent.
@v1mkss
v1mkss / JetBrains Activation.md
Last active May 7, 2024 16:38
JetBrains Activation

Choose any IDE from Jetbrains, then the activation window opens, go to the β€œProxy Settings” and paste the following:

  • Manual proxy configuration http:
    • Hostname: localhost
    • port: 80
  • No proxy for:
*.apache.org, *.github.com, *.github.io, *.githubusercontent.com, *.gitlab.com, *.google.com, *.gradle.org, *.jetbrains.space, *.maven.org, cache-redirector.jetbrains.com, cloudconfig.jetbrains.com, download-cdn.jetbrains.com, download.jetbrains.com, downloads.marketplace.jetbrains.com, ea-report.jetbrains.com, github.com, gitlab.com, google.com, gradle.org, jcenter.bintray.com, plugins.jetbrains.com, resources.jetbrains.com, www.jetbrains.com

Activation Key:

@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active May 7, 2024 16:35
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@rxaviers
rxaviers / gist:7360908
Last active May 7, 2024 16:34
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: