Skip to content

Instantly share code, notes, and snippets.

View Jimmerz28's full-sized avatar

Jim Holby Jimmerz28

View GitHub Profile
@Jimmerz28
Jimmerz28 / build.js
Created August 19, 2020 14:41 — forked from phdesign/build.js
Create react app no chunking, single file embedded CSS
// npm install rewire
const rewire = require('rewire');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const defaults = rewire('react-scripts/scripts/build.js');
const config = defaults.__get__('config');
// Consolidate chunk files instead
config.optimization.splitChunks = {
cacheGroups: {
default: false,
@Jimmerz28
Jimmerz28 / generate-ssh-key.sh
Created February 18, 2020 14:53 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@Jimmerz28
Jimmerz28 / Makefile
Created March 2, 2019 23:44 — forked from wenchy/Makefile
Compile all .cpp files into one target under the current directory.
CC := g++
CFLAGS := -Wall -g
TARGET := test
# $(wildcard *.cpp /xxx/xxx/*.cpp): get all .cpp files from the current directory and dir "/xxx/xxx/"
SRCS := $(wildcard *.cpp)
# $(patsubst %.cpp,%.o,$(SRCS)): substitute all ".cpp" file name strings to ".o" file name strings
OBJS := $(patsubst %.cpp,%.o,$(SRCS))
all: $(TARGET)
@Jimmerz28
Jimmerz28 / README-Template.md
Created December 3, 2018 08:44 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@Jimmerz28
Jimmerz28 / install-pre-commit.sh
Created March 2, 2018 09:26 — forked from stefansundin/install-pre-commit.sh
Git pre-commit check to stop accidental commits to master and develop branches. There is also a variant with a core.whitespace check.
#!/bin/sh
# This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch.
# There are four variants that I have built:
# - pre-commit: stops commits to "master" and "develop" branches.
# - pre-commit-2: also includes a core.whitespace check.
# - pre-commit-3: the core.whitespace check and an EOF-newline-check.
# - pre-commit-4: only the core.whitespace check.
# Set desired version like this before installing:
# FILE=pre-commit
sudo apt-add-repository ppa:fish-shell/release-2 -y && sudo apt-add-repository ppa:git-core/ppa -y && sudo apt-get update && sudo apt-get install fish && sudo apt-get install git && sudo apt-get install nfs-kernel-server
@Jimmerz28
Jimmerz28 / gist:f9b4155f24f88f757ee3
Created June 8, 2014 22:39
Ghost Nginx Config (Not Hardened)
server
{
listen 80;
server_name <custom url>;
location /
{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
@Jimmerz28
Jimmerz28 / gist:10923923
Last active August 29, 2015 13:59
nginx config (subdomains)
server
{
listen 80;
listen [::]:80 default_server ipv6only=on;
# Make site accessible from http://localhost/
server_name ~^(.+)?(\.localhost)$;
location /
{