Skip to content

Instantly share code, notes, and snippets.

View bo01ean's full-sized avatar

Nathan Trujillo bo01ean

View GitHub Profile
@bo01ean
bo01ean / webpack.config.js
Created February 28, 2019 09:20
swc-loader for create-react-app webpack
'use strict';
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
@kekru
kekru / Remote API via daemon.json.md
Last active January 11, 2024 18:20
Enable Docker Remote API via daemon.json
@jonico
jonico / Jenkinsfile
Last active January 31, 2024 09:43
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
FROM tomcat:8.0.38
# Place the code version inside the webapps directory
ARG PACKAGE_VERSION
RUN echo "${PACKAGE_VERSION}" >> /usr/local/tomcat/webapps/version.txt
COPY project.war /usr/local/tomcat/webapps/project.war
COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
@undefinedbehavior
undefinedbehavior / rpi3_rust_led.rs
Last active January 17, 2017 06:47
Rust demo for Pi 3 bare metal
#![feature(asm)]
#![feature(lang_items)]
#![crate_type = "staticlib"]
#![no_std]
const GPIO_BASE: u32 = 0x3F200000; // base address for Pi 2 and Pi 3
fn sleep(value: u32){
for _ in 1..value {
unsafe { asm!("");}
@Jaykul
Jaykul / Blog: Installing Docker.md
Last active March 7, 2024 09:56
Docker in PowerShell on Windows 10

Using Docker on Windows 10 (Updated at the end of 2019)

Since I wrote this originally, Docker on Windows has become a first-class supported tool, with a Windows Installer and well-documented installation processes from docker and from Microsoft.

Today, I actually install docker using boxstarter scripts where I can Enable-WindowsOptionalFeature -Online -FeatureName containers -All and then choco upgrade -y docker-desktop as well as installing tooling for VS Code code --install-extension "ms-azuretools.vscode-docker".

I've left the rest of these notes here as a historical record, more than anything else. You should not expect the script below to work, but you certainly don

@cosmincatalin
cosmincatalin / install-rstudio-server.sh
Last active October 27, 2022 11:07
AWS EMR bootstrap to install RStudio Server along with sparklyr
#!/bin/bash
# These variables can be overwritten using the arguments below
VERSION="1.1.463"
# drwho is listed as user in YARN's Resource Manager UI.
USER="drwho"
# Depending on where the EMR cluster lives, you might have to change this to avoid security issues.
# To change the default password (and user), use the arguments bellow.
# If the cluster is not visible on the Internet, you can just leave the defaults for convenience.
PASS="tardis"
Go to: chrome://settings/searchEngines
Add a new search engine with the following settings
Gif | Gif | https://www.google.com/search?q=%s&tbm=isch&tbs=itp:animated
Type gif in the address bar press TAB and enter your search query
@drpauldixon
drpauldixon / osx_haproxy.md
Created June 7, 2016 12:15
Compile HAProxy with Lua and OpenSSL on Mac OS X

Compile HAProxy with Lua and OpenSSL on Mac OS X

Tags: osx haproxy lua openssl

Compile LUA:

mkdir ~/oss
wget http://www.lua.org/ftp/lua-5.3.3.tar.gz
tar xvzf lua-5.3.3.tar.gz
@gbaman
gbaman / HowToOTGFast.md
Last active May 1, 2024 08:26
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i