Skip to content

Instantly share code, notes, and snippets.

View howardjones's full-sized avatar

Howard Jones howardjones

  • United Kingdom
View GitHub Profile
@IanColdwater
IanColdwater / twittermute.txt
Last active May 23, 2024 18:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@jsdevtom
jsdevtom / frontend-ws-connection.ts
Last active June 13, 2024 02:44
kubernetes-ingress websockets with nodejs
export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`);
export const wsObserver = ws
.pipe(
retryWhen(errors =>
errors.pipe(
delay(1000)
)
)
);
@mathieucaroff
mathieucaroff / download-buidl-and-install-ghdl.sh
Created September 28, 2018 09:50
Download build and install GHDL on Ubuntu 18.04 (tested 2018-09-28)
#!/bin/sh
#
# download-buidl-and-install-ghdl.sh
#
# It took about 5 minutes on my laptop (2018-09-28).
sudo apt update
sudo apt install -y git make gnat zlib1g-dev
git clone https://github.com/ghdl/ghdl
cd ghdl
@danielepolencic
danielepolencic / README.md
Last active May 20, 2024 18:07
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@bfocht
bfocht / postbuild.js
Last active March 2, 2019 14:19
post build script for create-react-app to move the js to a dist folder
const fs = require('fs');
const file = require('./build/asset-manifest.json')['main.js'];
const src = './build/';
const dest = './dist/';
if (!fs.existsSync(dest)){
fs.mkdirSync(dest);
}
if (fs.existsSync(dest+'index.js')){
@andkirby
andkirby / slack.sh
Last active June 5, 2024 09:55
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@brennanneoh
brennanneoh / README.md
Last active May 20, 2023 21:02
Anet A8 Printer Profile

Setup

  1. Install Cura 2.4
  2. Copy anet_a8.def.json to /Applications/Cura.app/Contents/Resources/resources/definitions
  3. Open Cura
  4. Expand Custom, then select Anet A8
  5. Click Finish
@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@Brainiarc7
Brainiarc7 / gifenc.sh
Created December 17, 2016 16:08 — forked from dplesca/gifenc.sh
#gif with text overlay #generator using #ffmpeg - inspired by http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
#!/bin/bash
#parameters:
# $1 - mp4 url
# $2 - start time in format hh:mm:ss.mic
# $3 - duration in seconds
# $4 - text for gif overlay
# $5 - output file without extension
if [ "$#" -ne 5 ]
then
echo "Usage: gifenc.sh \$1 \$2 \$3 \$4 \$5
@adamreisnz
adamreisnz / package.json
Last active January 19, 2024 13:01
Simple pure npm scripts build process
{
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "http://www.project-name.com",
"author": {
"name": "Adam Reis",
"url": "http://adam.reis.nz"
},
"license": "UNLICENSED",