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
@tobiasschulz
tobiasschulz / gist:8cef52d09099ae6fba58d95ae4b5a737
Created May 29, 2019 16:53
add domain user to local groups
net localgroup Benutzer DOMAIN\tobias.schulz /add
net localgroup Administratoren DOMAIN\tobias.schulz /add
@tobiasschulz
tobiasschulz / WSL-ssh-server.md
Created May 28, 2019 12:25 — forked from dentechy/WSL-ssh-server.md
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:
Its fucking hideous!!!!!!!!!!!!!!!!!!!!!!!!!!1
In VS Command prompt:
vsregedit set "%VSINSTALLDIR%/" HKCU "" UseSolutionNavigatorGraphProvider dword 0
shutdown -r -f -m 192.168.11.147 -t 0
<Project>
<ItemGroup>
<AdditionalFiles Update="@(AdditionalFiles)">
<LinkBase Condition="'%(LinkBase)' != ''">$([MSBuild]::EnsureTrailingSlash(%(LinkBase)))</LinkBase>
<Link Condition="'%(Link)' == '' And !$([MSBuild]::ValueOrDefault('%(FullPath)', '').StartsWith($([MSBuild]::EnsureTrailingSlash($(MSBuildProjectDirectory)))))">%(LinkBase)%(RecursiveDir)%(Filename)%(Extension)</Link>
</AdditionalFiles>
</ItemGroup>
</Project>
https://stackoverflow.com/a/44427519
CURLcode curl_easy_setopt_sbyteptr(struct Curl_easy *data, CURLoption tag, int8_t* p)
{
return curl_easy_setopt(data, tag, p);
}
CURLcode curl_easy_setopt_byteptr(struct Curl_easy *data, CURLoption tag, uint8_t* p)
{
return curl_easy_setopt(data, tag, p);
}
CURLcode curl_easy_setopt_int(struct Curl_easy *data, CURLoption tag, int32_t p)
{
@tobiasschulz
tobiasschulz / Lazy BuildConfig.cs
Created December 16, 2018 02:22
Lazy BuildConfig
private static Lazy<BuildConfig> _instance = new Lazy<BuildConfig> (() => (BuildConfig)Activator.CreateInstance (Type.GetType ($"BuildConfig_Local, Framework.Portable, Version={typeof (BuildConfig).Assembly.GetName ().Version}, Culture=neutral, PublicKeyToken=null"), nonPublic: true));
mklink /J C:\tobias.schulz\Android\android-sdk\system-images\ D:\tobias.schulz\Android\android-sdk\system-images\
@tobiasschulz
tobiasschulz / usoshared-logs-cleanup.ps1
Last active November 25, 2018 18:39
USOShared\Logs
remove-item -recurse -force C:\ProgramData\USOShared\Logs
#!/usr/bin/python2
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Virtual Me2Me implementation. This script runs and manages the processes
# required for a Virtual Me2Me desktop, which are: X server, X desktop
# session, and Host process.
# This script is intended to run continuously as a background daemon
# process, running under an ordinary (non-root) user account.