Skip to content

Instantly share code, notes, and snippets.

View christianparpart's full-sized avatar
🎃
Loading

Christian Parpart christianparpart

🎃
Loading
View GitHub Profile
@christianparpart
christianparpart / terminal-synchronized-output.md
Last active April 5, 2024 23:07
Terminal Spec: Synchronized Output

Synchronized Output

Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output, except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.

Semantics

When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.

This mode attempts to mitigate that.

@slikts
slikts / Linuxifying Windows.md
Last active September 4, 2023 07:30
Linuxifying Windows

nelabs.dev

Linuxifying Windows for development

This guide is for 'linuxing-up' Windows as a development environment; it focuses on setting up [WSL], an Ubuntu Hyper-V virtual machine, [wsltty] (a nice terminal emulator) and various tweaks.

Rationale

@christianparpart
christianparpart / vs2017-cheatsheet.md
Last active August 13, 2018 07:52
Visual Studio (2017) Cheat Sheet

Visual Studio 2017 Shortcuts

Navigation

  • <ALT+SHIFT+ENTER> Toggle Fullscreen
  • <CTRL+K, O> Switch between header/source
  • <CTRL+,> quick open & navitate to anything (by filename, type name, ...)
  • <CTRL+T> quick open any
  • <CTRL+G> Go to to line
  • `` jump to matching brace/bracket
HMODULE hUser = GetModuleHandleA("user32.dll");
if (hUser)
{
pfnSetWindowCompositionAttribute setWindowCompositionAttribute = (pfnSetWindowCompositionAttribute)GetProcAddress(hUser, "SetWindowCompositionAttribute");
if (setWindowCompositionAttribute)
{
ACCENT_POLICY accent = { ACCENT_ENABLE_BLURBEHIND, 0, 0, 0 };
WINDOWCOMPOSITIONATTRIBDATA data;
data.Attrib = WCA_ACCENT_POLICY;
data.pvData = &accent;
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 25, 2024 15:17
Hyperlinks in Terminal Emulators
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active February 21, 2024 03:02
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@natefoo
natefoo / 00README.md
Last active April 15, 2024 11:48
Linux Distribution Detection

Distribution Detection

I am working on adding support for building and distributing (via PyPI) Python Wheels with C Extensions to the Python wheel and pip packages. The discussion on Distutils-SIG continues, but I believe it is fairly certain that some effort to correctly identify Linux distributions will need to be made. I've begun efforts to add this support to wheel.

How you can help

If you have a Linux distribution or version of a listed distribution not in this gist, or one of the ones I have not directly verified, I could use the following:

  • The contents of /etc/os-release, if it exists
@jameshfisher
jameshfisher / How to make a private Gist public.md
Created January 5, 2014 16:31
How to make a private Gist public

Github provides no facility to do this via the UI. This is sad, because it would be extremely useful in order to draft something before publishing it. It would also be trivial for them to implement. Never mind; here's how to do it manually:

  1. Get the "Clone this Gist" text from the left-hand side of the private Gist, e.g. https://gist.github.com/b9cc265982870c091a1e.git, and extract the ID b9cc265982870c091a1e.
  2. Go to https://gist.github.com/ and create a dummy new public Gist.
  3. Get the "Clone this Gist" text from the left-hand side, e.g. https://gist.github.com/8270253.git, and extract the ID 8270253.
  4. git clone git@gist.github.com:b9cc265982870c091a1e tmp-dir && cd tmp-dir && git push -f git@gist.github.com:8270253.git
@scaryghost
scaryghost / dnssd.cpp
Last active February 23, 2020 15:27
How to do a SRV or TXT record lookup in C/C++ on Linux.
/**
* compile: g++ -std=c++0x -o dnssd dnssd.cpp -lresolv
* Your g++ compiler must have lambda support
*
* Code based on examples from:
* http://www.cs.columbia.edu/~zwb/project/dotslash/dots_apache/dnsc.c
* http://people.samba.org/bzr/jerry/slag/unix/query-srv.c
*/
#include <arpa/nameser.h>
#include <functional>
@macmade
macmade / BashStory
Created November 22, 2011 18:58
BashStory - When I tried to SSH my girlfriend
Girlfriend/BSD
Login: love
Password:
Login incorrect
Login: boyfriend
Password: