Skip to content

Instantly share code, notes, and snippets.

View Pritesh-Patel's full-sized avatar

Pritesh Patel Pritesh-Patel

View GitHub Profile

Setup for remote development on wsl rough steps (WIP)

  1. Install wsl (wsl2) preferred from windows insider build
  2. setup ssh
    • change default port
    • permit your user
    • turn off password login (only allow keys)
  3. create task in windows task scheduler to start up sshd on boot
  4. setup firewall rules for the port you chose
#!/bin/sh
wget https://github.com/codercom/code-server/releases/download/1.696-vsc1.33.0/code-server1.696-vsc1.33.0-linux-x64.tar.gz
tar -xvzf code-server1.696-vsc1.33.0-linux-x64.tar.gz
mkdir -p /home/$USER/.local/bin
touch /home/$USER/.local/bin/start_ide.sh
echo '#!/bin/sh' >> /home/$USER/.local/bin/start_ide.sh
echo '/home/prit/code-server1.696-vsc1.33.0-linux-x64/code-server --password=local' >> /home/$USER/.local/bin/start_ide.sh
@Pritesh-Patel
Pritesh-Patel / ChatSanitiser.kt
Last active February 27, 2016 22:11
A chat sanitiser exercise to get familiar with Kotlin
data class BadWord(val word:String, val severity:Int)
fun main(args: Array<String>) {
val chat = Chat()
while(true){
println("Enter message...")
val input = readLine()
@Pritesh-Patel
Pritesh-Patel / Dashing Pull Request GitHub Enterprise Widget.md
Last active January 9, 2016 14:00
Dashing Pull Request GitHub Enterprise Widget

Dashing Widget - Pull Requests For GitHub Enterprise

  • Place the coffee,html and scss files into a folder named pull_requests in the widgets folder
  • Place the rb file into the jobs folder

Add octokit to the gemfile:

gem 'octokit'
@Pritesh-Patel
Pritesh-Patel / Dashing Scoverage Widget.md
Last active June 27, 2019 00:24
Scoverage Dashboard Plugin

Dashing Widget - Scoverage

  • Place the coffee,html and scss files into a folder named pull_requests in the widgets folder
  • Place the rb file into the jobs folder

Add nokogiri to the gemfile:

gem 'nokogiri'
@Pritesh-Patel
Pritesh-Patel / Timer.cs
Created October 15, 2015 19:59
Unity timer component.
using UnityEngine;
using System.Collections;
public class Timer : MonoBehaviour {
private bool started = false;
public float currTime = 0;
void Update () {
@Pritesh-Patel
Pritesh-Patel / Health.cs
Created October 15, 2015 19:48
Simple unity health component.
using UnityEngine;
using System.Collections;
public class Health : MonoBehaviour {
public int maxHealth;
public int currentHealth;
// Use this for initialization
void Start () {