Skip to content

Instantly share code, notes, and snippets.

View tobiasschulz's full-sized avatar
🌴
On vacation

Tobias Schulz tobiasschulz

🌴
On vacation
View GitHub Profile
@santaklouse
santaklouse / CrossOver.sh
Last active June 10, 2024 11:46
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@dentechy
dentechy / WSL-ssh-server.md
Last active June 13, 2024 15:17
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@cmendible
cmendible / Roslyn.CodeGeneration.Program.cs
Created August 16, 2017 09:30
Create a class with dotnet core and roslyn with using statements outside the namespace
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace Roslyn.CodeGeneration
{
public class Program
{
public static void Main(string[] args)
@tobiasschulz
tobiasschulz / VS2017 Disable File Arrows
Created March 25, 2017 21:37
VS2017 Disable File Arrows
http://stackoverflow.com/a/42690759
Instructions for Visual Studio 2017:
- Close Visual Studio 2017
- Open Registry Editor (regedit), select HKEY_USERS
- File → Load Hive → %localappdata%\Microsoft\VisualStudio\15.0_<id>\privateregistry.bin where <id> is some hexadecimal gibberish. Set Key Name to the one you like e.g. vs2017
- Go to HKEY_USERS\vs2017\Software\Microsoft\VisualStudio\15.0_<id>
- Create new key UseSolutionNavigatorGraphProvider of DWORD (32-bit) type, value 0
- Select HKEY_USERS\vs2017, File → Unload Hive
@SaschaWillems
SaschaWillems / gist:47be6970a3e99a3d30e1
Last active September 26, 2018 22:09
Intel Vulkan Mesa on Ubuntu 15.10
# Pre requisites
- Enable DRI3 as described in https://vulkan.lunarg.com/app/docs/v1.0.3.1/getting_started_linux
- Install a library for SHA, e.g. sudo apt-get install libgcrypt11-dev (if not already present)
- Otherwise the driver may throw an error with "_mesa_sha1_compute" when loading SPIR-V shaders
# Building
- Clone Mesa Master : git clone git://anongit.freedesktop.org/mesa/mesa -b Master
- cd mesa
- autoreconf -vfi
- ./configure --with-dri-drivers=i965 --with-gallium-drivers= --with-sha1= --with-vulkan-drivers=intel
@jasonwyatt
jasonwyatt / themes-debug.xml
Last active January 29, 2016 21:06 — forked from dlew/themes-debug.xml
With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where the hell did this color come from?" You can replace your normal theme with this debug theme to help figure out the source of that color.
<!-- You can change the parent around to whatever you normally use -->
<style name="DebugColors" parent="Theme.AppCompat">
<!-- System colors -->
<item name="android:windowBackground">@color/__debugWindowBackground</item>
<item name="android:colorPressedHighlight">#FF4400</item>
<item name="android:colorLongPressedHighlight">#FF0044</item>
<item name="android:colorFocusedHighlight">#44FF00</item>
<item name="android:colorActivatedHighlight">#00FF44</item>
@JamesChevalier
JamesChevalier / mac_utf8_insanity.md
Last active May 2, 2024 23:38
Unicode on Mac is insane. Mac OS X uses NFD while everything else uses NFC. This fixes that.

convmv manpage

Install convmv if you don't have it

sudo apt-get install convmv

Convert all files in a directory from NFD to NFC:

convmv -r -f utf8 -t utf8 --nfc --notest .

@flibitijibibo
flibitijibibo / flibitSave.c
Last active November 21, 2017 23:31
flibit's XDG/OSX Save and Config Folder Thing
/* XDG/OSX Save and Config Folder Thing
* Written by Ethan "flibitijibibo" Lee
* http://www.flibitijibibo.com/
*
* Released under public domain.
* No warranty implied; use at your own risk.
*/
#include <stdio.h>
#include <stdlib.h>
@kanru
kanru / Android.mk
Created January 6, 2012 04:16
Android GPS using libhardware
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
gps_test.cpp
LOCAL_SHARED_LIBRARIES := \
libcutils libhardware
LOCAL_MODULE:= test-gps
@ngbrown
ngbrown / ArrayHelpers.cs
Created June 18, 2010 15:56
C# Extension Methods
namespace Helpers
{
using System;
/// <summary>
/// A static class of extension methods for <see cref="Array"/>.
/// </summary>
public static class ArrayHelpers
{
/// <summary>