Skip to content

Instantly share code, notes, and snippets.

View dacoffey's full-sized avatar
😎
BLAZING FAST!! 😂

David Adam Coffey dacoffey

😎
BLAZING FAST!! 😂
View GitHub Profile

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@hawkins
hawkins / screen.js
Created January 16, 2017 06:22
Node.js blessed screen - keep your output separate from your input!
/*
* I've used blessed to create a textbox at the bottom line in the screen.
* The rest of the screen is the 'body' where your code output will be added.
* This way, when you type input, your program won't muddle it with output.
*
* To try this code:
* - $ npm install blessed --save
* - $ node screen.js
*
* Key points here are:
@actuino
actuino / bt_speaker-raspberry_pi-zero_w.md
Last active December 30, 2024 06:10
Setting up a Bluetooth Speaker from the command line on a raspberry Pi Zero W

The setup of a bluetooth speaker on a Pi Zero W is pretty touchy.

Please get in touch via Twitter @actuino or http://www.actuino.fr/ if you've got comments or improvements to this quick draft.

First checks

  • Use a solid power source
  • check the speaker works on another hardware (android phone f.i.)
  • make sure you've updated your Raspbian, install and run rpi-update just in case.
@deviantony
deviantony / README.md
Last active September 4, 2024 02:41
Portainer HTTP API by example

DEPRECATION NOTICE

This gist is now deprecated in favor of our official documentation: https://documentation.portainer.io/api/api-examples/ which contains up to date examples!

THE FOLLOWING DOCUMENTATION IS DEPRECATED

Please refer to the link above to get access to our updated API documentation and examples.

@balloob
balloob / demo.js
Created August 1, 2017 15:50
Example using home-assistant-js-websocket with Node
const WebSocket = require('ws');
global.WebSocket = WebSocket;
const HAWS = require("home-assistant-js-websocket");
const getWsUrl = haUrl => `ws://${haUrl}/api/websocket`;
HAWS.createConnection(getWsUrl('localhost:8123')).then(conn => {
HAWS.subscribeEntities(conn, logEntities);
});
@ThinGuy
ThinGuy / sshuttle-opts.sh
Created December 2, 2017 01:19
Pass sshuttle ssh options to get around remote hosts whose identification changes often (testt/dev/ops systems)
# It is possible to paas sshuttle common ssh options such as UserKnownHostsFile, StrictHostIPChecking, CheckHostIP etc
# Normal sshuttle command:
sshuttle -r ubuntu@<some-ip>:2222 <remote_subnet(s)/CIDR>
# In the above scenario, for most systems, StrictHostKeyChecking, and all other good security features will be in effect.
# That's normally a good thing, except when it's not. Like when you have to continually clean a known hosts file because
# your testing different build options and the remote host's ECDSA, DSA, RSA <or whatever> keeps changing.
# By making use of the -e option you can control how sshuttle uses ssh. Any option your ssh-client supports can be passed.
@gaearon
gaearon / index.html
Last active March 10, 2025 04:43
Multiple React components on a single HTML page
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@fnky
fnky / ANSI.md
Last active May 18, 2025 13:00
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@Jiab77
Jiab77 / ntopng-install-on-ubuntu-server-18.04.md
Last active October 16, 2022 05:06
Ntop-ng Install on Ubuntu Server 18.04 (written for Raspberry Pi but can be used on any other platforms)

Ntop-ng Install on Ubuntu Server 18.04

Instructions are written for Raspberry Pi but can be used on any other platforms.

As there is no pre-built packages for ARM platforms I've found some packages but you might have no other choices than do the compilation yourself... 😅

Pre-Built packages

I've finally been able to get the hand on their pre-built packages... I've just read too fast their documentation... :face_palm:

You could find their packages here: http://packages.ntop.org/

@nhtua
nhtua / 00.install-android-sdk.sh
Last active May 9, 2025 10:28
Run a Headless Android Device on Ubuntu server (no GUI)
#!/bin/bash -i
#using shebang with -i to enable interactive mode (auto load .bashrc)
set -e #stop immediately if any error happens
# Install Open SDK
apt update
apt install openjdk-8-jdk -y
update-java-alternatives --set java-1.8.0-openjdk-amd64
java -version