Skip to content

Instantly share code, notes, and snippets.

View bastiao's full-sized avatar

Luís Bastião Silva bastiao

View GitHub Profile
@vmsp
vmsp / UnbundleTagHelper.cs
Last active November 30, 2020 11:32
BundleMinifier - Unbundle scripts during development and minify them for production in ASP.NET Core
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Newtonsoft.Json;
@StevenACoffman
StevenACoffman / phabricator-vs-github.md
Last active July 17, 2023 03:23
PhabricatorVsGithub.md

What's the diff between phabricator and github?

Phabricator’s and github’s usage of git is very different. With github you are always pushing new commits, but with phabricator you should never push (except when updating a deploy branch from master). You are better off pretending that we don't actually use git, and that the Khan Academy recommended Phabricator workflow is a series of inscrutable magic incantations that must be meticulously performed or you'll release Ẕ̶̨̫̹̌͊͌͑͊̕͢͟a̡̜̦̝͓͇͗̉̆̂͋̏͗̍ͅl̡̛̝͍̅͆̎̊̇̕͜͢ģ̧̧͍͓̜̲͖̹̂͋̆̃̑͗̋͌̊̏ͅǫ̷̧͓̣͚̞̣̋̂̑̊̂̀̿̀̚͟͠ͅ.

If you are still irrationally stubborn, like I am, and really want to continue using the familiar and universal-outside-khan git workflow, then since you will be fighting the Khan tools you need to be firm and unambiguous in communicating to phabricator what you want it to do.

My workflow is always:

  1. Make a branch.
  2. Make some changes
@alexellis
alexellis / kvm_minikube.md
Last active July 21, 2023 10:45
Run multiple minikube Kubernetes clusters on Ubuntu Linux with KVM

Ramp up your Kubernetes development, CI-tooling or testing workflow by running multiple Kubernetes clusters on Ubuntu Linux with KVM and minikube.

In this tutorial we will combine the popular minikube tool with Linux's Kernel-based Virtual Machine (KVM) support. It is a great way to re-purpose an old machine that you found on eBay or have gathering gust under your desk. An Intel NUC would also make a great host for this tutorial if you want to buy some new hardware. Another popular angle is to use a bare metal host in the cloud and I've provided some details on that below.

We'll set up all the tooling so that you can build one or many single-node Kubernetes clusters and then deploy applications to them such as OpenFaaS using familiar tooling like helm. I'll then show you how to access the Kubernetes clusters from a remote machine such as your laptop.

Pre-reqs

  • This tutorial uses Ubuntu 16.04 as a base installation, but other distributions are supported by KVM. You'll need to find out how to install
@jimblom
jimblom / certs.sh
Last active May 23, 2022 16:27
Update Java cacerts
#!/bin/sh
# certs.sh
# use this for Yocto/Edison:
LIB=lib
# use this for WRLinux/Gateway
# LIB=lib64
if [ -f /usr/$LIB/jvm/java-8-openjdk/jre/lib/security/cacerts ]; then
mv /usr/$LIB/jvm/java-8-openjdk/jre/lib/security/cacerts \
#!/bin/bash
set -e
# REQUIRED ACTION: Configure your backup server vars - see OVH Server Manager's "Backups" tab.
# BACKUP_HOST_PREFIX: use the prefix domain for the listed "Name" value on the "Backups" tab.
# Example: With a 'Name' value `ftpback-bhs1-3.ip-111-222-333.net` you would need to set `BACKUP_HOST_PREFIX=ftpback-bhs1-3`
# Add something likethese to your ~/.bashrc - /etc/profile
#export OVH_SERVER_ID="ns5xxxxx.ip-x-x-x.net"
#export BACKUP_HOST_PREFIX="ftpback-bhs1-x"