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 / gist:1292752
Created October 17, 2011 14:40
trying to built rubinius ;(
trapni@windsor ~/local/src/rubinius $ git nuke
Removing config.rb
Removing configure.log
Removing lib/readline.rb
Removing lib/rubinius/build_config.rb
Removing vm/capi/18/include/config.h
Removing vm/capi/18/include/rbx_config.h
Removing vm/capi/19/include/config.h
Removing vm/capi/19/include/rbx_config.h
Removing vm/gen/
@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:
@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>
@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 [email protected]:b9cc265982870c091a1e tmp-dir && cd tmp-dir && git push -f [email protected]:8270253.git
@natefoo
natefoo / 00README.md
Last active September 15, 2024 06:33
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
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active November 2, 2024 12:39
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 && \
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active November 13, 2024 14:50
Hyperlinks in Terminal Emulators
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;
@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
@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