Skip to content

Instantly share code, notes, and snippets.

View X0nic's full-sized avatar

Nathan Lee X0nic

View GitHub Profile
@KroniK907
KroniK907 / GitButler-WSL.md
Last active June 26, 2024 02:03
Installing GitButler on Windows via WSL

Installing GitButler on Windows via WSL - A Complete Guide

This guide will provide a complete walkthrough for getting GitButler setup and functioning on a windows environment using Windows Subsystem for Linux (WSL).

Please note that GitButler on windows via wsl is not well tested and not officially supported, though one of the top priorities of the GitButler team is to get a working windows build out asap. For now, however this is the easiest solution I have developed.

Prerequisites:

  • You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11 for this guide to work correctly.
  • I highly suggest using the windows terminal app for doing all the command line work if you are not using it already, though this is not required.

Known Issues

@khalidx
khalidx / node-typescript-esm.md
Last active June 13, 2024 12:39
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@merikan
merikan / Jenkinsfile
Last active June 13, 2024 03:56
Some Jenkinsfile examples
Some Jenkinsfile examples
@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active March 1, 2024 14:39
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active June 18, 2024 20:48
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
    
oc create clusterquota user-qa \
@esamattis
esamattis / application.html.erb
Last active May 19, 2019 00:36
React hot reloading with Webpack for Ruby on Rails
<script charset="utf-8">
<% if ENV["RAILS_ENV"] == "production" %>
var script = "/react-app-bundle.js";
<% else %>
console.warn("Development mode. Make sure to start 'node devServer.js'");
var script = "http://" + (location.host || 'localhost').split(':')[0] + ":4000/react-app-bundle.js"
<% end %>
document.write('<script src="' + script + '"></' + 'script>');
</script>
@kevcha
kevcha / namespace_partials_sharing.md
Last active December 29, 2022 07:53
How to automatically share partials between namespaces in rails

When writing a rails app, we often have to deal with multiple namespaces. The most common case is having classic actions and some others in an admin namespace. Some actions may have same views between namespaces.

For exemple, you could have a ProjectsController with an action index :

class ProjectsController < ApplicationController
  def index
    # do something
  end
end
@r00k
r00k / q1.md
Last active January 29, 2017 03:00
Quizzy Question 1

Question 1

What object-oriented programming advice is this code violating?

def check_for_overheating(system_monitor)
  if system_monitor.temperature > 100
    system_monitor.sound_alarms
  end
end
@brodock
brodock / update-alternatives-ruby
Last active December 29, 2015 15:49
Setting update-alternatives for ubuntu as a way to change system ruby with compiled one
# update-alternative (install)
sudo update-alternatives --install /usr/bin/ruby ruby2.0 /opt/rubies/2.0.0-p353/bin/ruby 0
sudo update-alternatives --install /usr/bin/erb erb2.0 /opt/rubies/2.0.0-p353/bin/erb 0
sudo update-alternatives --install /usr/bin/gem gem2.0 /opt/rubies/2.0.0-p353/bin/gem 0
sudo update-alternatives --install /usr/bin/irb irb2.0 /opt/rubies/2.0.0-p353/bin/irb 0
sudo update-alternatives --install /usr/bin/rake rake2.0 /opt/rubies/2.0.0-p353/bin/rake 0
sudo update-alternatives --install /usr/bin/rdoc rdoc2.0 /opt/rubies/2.0.0-p353/bin/rdoc 0
sudo update-alternatives --install /usr/bin/ri ri2.0 /opt/rubies/2.0.0-p353/bin/ri 0
sudo update-alternatives --install /usr/bin/testrb testrb2.0 /opt/rubies/2.0.0-p353/bin/testrb 0