Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nathan815's full-sized avatar

Nathan Johnson nathan815

View GitHub Profile
@nathan815
nathan815 / aksdnsfix.sh
Last active December 23, 2020 17:42
AKS DNS Fix: Custom Subnet Route Table Association
AKS_RG="$1"
CLUSTER_NAME="$2"
VNET_NAME="$3"
SUBNET_NAME="$4"
LOCATION="$5"
LOCATION=${LOCATION:-"eastus"} # default to eastus
echo "AKS_RG=$AKS_RG, VNET_NAME=$VNET_NAME, SUBNET_NAME=$SUBNET_NAME"
AKS_MC_RG="MC_${AKS_RG}_${CLUSTER_NAME}_${LOCATION}"
@nathan815
nathan815 / wrapMiddleware.ts
Created December 5, 2020 07:32
Socket.io Express Middleware Wrapper
function wrapMiddleware(fn: (req: Request, res: Response, next: NextFunction) => void) {
return function (socket: Socket, next: (err?: ExtendedError) => void) {
fn(socket.request as Request, {} as Response, next as NextFunction);
};
}
@nathan815
nathan815 / docker-compose.yml
Last active November 6, 2023 23:50
Updated docker-compose.yml for big-data-europe/docker-hadoop
version: "2.1"
services:
namenode:
build: ./namenode
container_name: namenode
volumes:
- hadoop_namenode:/hadoop/dfs/name
environment:
- CLUSTER_NAME=test
@nathan815
nathan815 / build.gradle
Created January 10, 2020 19:30
Exclude paths in jacoco
jacocoTestReport {
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
"**/src/main/java/**",
"other/path/to/exclude"
])
}))
}
}
@nathan815
nathan815 / DriveTrain.java
Last active February 22, 2017 19:44
FRC code
package org.usfirst.frc.team5517.robot.subsystems;
import org.usfirst.frc.team5517.robot.RobotMap;
import org.usfirst.frc.team5517.robot.commands.Drive;
import org.usfirst.frc.team5517.robot.sensors.ADXRS453Gyro;
import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.command.Subsystem;
/**
@nathan815
nathan815 / style.css
Created February 10, 2017 23:04
Fix GitHub header bar
.header-logo-invertocat {
float: left;
margin-right: 10px;
margin-left: -2px;
color: #555;
white-space: nowrap;
}
.header-search {
float: left;
<?php
// Author: Ngo Minh Nam
$dir = "/path/to/your/repo/";
$output = array();
chdir($dir);
exec("git log",$output);
$history = array();
foreach($output as $line){
if(strpos($line, 'commit')===0){
### CodeIgniter ###
*/config/development
*/logs/log-*.php
*/logs/!index.html
*/cache/*
*/cache/!index.html
*/cache/!.htaccess
### Sublime Text ###
*.sublime-workspace