Skip to content

Instantly share code, notes, and snippets.

View johnstcn's full-sized avatar
🏳️‍🌈

Cian Johnston johnstcn

🏳️‍🌈
  • Ireland
  • 07:01 (UTC +01:00)
View GitHub Profile
#!/bin/bash
# This has been tested on the aws-linux Coder template, which runs Ubuntu Focal
# Check if LXDE is installed
if ! dpkg -s lxde &> /dev/null; then
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y lxde
else
echo "LXDE is already installed."
@nrjdalal
nrjdalal / QEMU-Silicon-Mac-Virtualization.md
Last active February 1, 2024 05:31
Create Virtual Machines using QEMU on Silicon based Apple Macs

Install QEMU on Silicon based Apple Macs (June 2021)

Option 1 - Automatically

zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)"

Option 2 - Manually

  • Install Xcode command line tools

xcode-select --install
@wybiral
wybiral / noscript-tracking.go
Last active September 11, 2023 08:53
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@derozic
derozic / ethminer_ubuntu__desktop_nvidia.md
Last active May 25, 2021 22:40 — forked from johnstcn/ethminer_ubuntu_nvidia.md
NVIDIA/CUDA ethminer setup under Ubuntu Desktop 16.04

Headless Ethminer (nVidia) Setup Guide

STR, July 2018

This outlines setting up mining on Ubuntu. This was first written in April 2017, and was extended in July 2018 to make it easier for both people who can handle headless ubuntu and for people who prefer desktop. It's also been updated for Bitmethod goodness to make it easier for a larger collection of people to successfully mine using GPUs.

This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.

The end result is an Ubuntu 16.04 LTS desktop running CUDA ethminer via systemd.

Hardware

@bsodmike
bsodmike / README.md
Last active March 13, 2023 05:04
OC Nvidia GTX1070s in Ubuntu 16.04LTS for Ethereum mining

Following mining and findings performed on EVGA GeForce GTX 1070 SC GAMING Black Edition Graphics Card cards.

First run nvidia-xconfig --enable-all-gpus then set about editing the xorg.conf file to correctly set the Coolbits option.

# /etc/X11/xorg.conf
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
@BretFisher
BretFisher / docker-for-mac.md
Last active April 26, 2024 09:38
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@frengky
frengky / nvidia-centos-update.md
Last active July 19, 2023 09:31
Update Nvidia driver on CentOS 7.x after kernel update

Update Nvidia driver on CentOS 7.x

Download the latest Nvidia driver on http://www.nvidia.com/drivers

Update the kernel to the latest version

$ yum update

Change to runlevel 3 - multi user mode for the next reboot

@groovenectar
groovenectar / roundedcube.scad
Last active April 6, 2024 04:40
roundedcube.scad - Fork me and make me better!
// More information: https://danielupshaw.com/openscad-rounded-corners/
// Set to 0.01 for higher definition curves (renders slower)
$fs = 0.15;
module roundedcube(size = [1, 1, 1], center = false, radius = 0.5, apply_to = "all") {
// If single value, convert to [x, y, z] vector
size = (size[0] == undef) ? [size, size, size] : size;
translate_min = radius;
@aktau
aktau / json_bench.go
Created June 23, 2014 12:42
golang: json (un)marshal benchmark
package main
import (
"bytes"
"encoding/json"
"io/ioutil"
"testing"
)
type js struct {
anonymous
anonymous / night-before-opsmas.txt
Created December 24, 2013 07:19
Twas the night before Opsmas..
'Twas the night before Christmas, when all through the racks
Not a server was alerting, not even Compaqs.
The backups were written to tapes with care
In hopes that later the data would be there.
The machines were nestled all snug in their sleds
Whilst visions of vengeance danced in their heads;
And oncall in his three-wolf and I in my rack.
Had just settled down for some syn and some ack.