Skip to content

Instantly share code, notes, and snippets.

View guitarrapc's full-sized avatar
:octocat:

Ikiru Yoshizaki guitarrapc

:octocat:
View GitHub Profile
@guitarrapc
guitarrapc / fix-wsl2-dns-resolution
Created July 6, 2021 01:24 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@guitarrapc
guitarrapc / ca.md
Created July 30, 2019 11:16 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@guitarrapc
guitarrapc / update-golang.md
Created July 29, 2018 17:29 — forked from nikhita/update-golang.md
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@guitarrapc
guitarrapc / nginx_ssl_server_name.md
Created July 29, 2018 09:49 — forked from kenjiskywalker/nginx_ssl_server_name.md
nginxのserver_nameとSSLの設定についてのメモ
@guitarrapc
guitarrapc / GyroCamera.cs
Created June 30, 2017 16:41 — forked from kormyen/GyroCamera.cs
Unity3D script for rotating camera with a phone's gyro. Includes smoothing and initial offset. Edited from https://forum.unity3d.com/threads/sharing-gyroscope-camera-script-ios-tested.241825/
using UnityEngine;
using System.Collections;
using Diversifly;
public class GyroCamera : MonoBehaviour
{
// STATE
private float _initialYAngle = 0f;
private float _appliedGyroYAngle = 0f;
private float _calibrationYAngle = 0f;
@guitarrapc
guitarrapc / VrModeSwitch.cs
Created June 30, 2017 16:41 — forked from kormyen/VrModeSwitch.cs
Unity3D script for switching between Cardboard VR mode and "magic window" (non-vr-36-mode). For reference GyroCamera.cs see https://gist.github.com/kormyen/a1e3c144a30fc26393f14f09989f03e1 . For referenced VREyeRaycaster.cs see Unity VR samples https://www.assetstore.unity3d.com/en/#!/content/51519
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.VR;
using VRStandardAssets.Utils;
public class VrModeSwitch : MonoBehaviour
{
// REFERENCE
[SerializeField] private GyroCamera _gyroControl;
# Install (simple way)
# Write this code to "%USERPROFILE%\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1"
# Install (module way)
# Place this script to "%USERPROFILE\Documents\WindowsPowerShell\Modules\UseLayoutRounding\UseLayoutRounding.psm1" and
# write "Import-Module UseLayoutRounding" to Microsoft.PowerShellISE_profile.ps1
Add-Type -TypeDefinition @"
using System;
using System.Collections.Generic;
using System.Reflection;