Skip to content

Instantly share code, notes, and snippets.

View eternal-turtles's full-sized avatar

John Newton eternal-turtles

View GitHub Profile
@eternal-turtles
eternal-turtles / README.md
Created November 11, 2024 01:58
LXD dev container with cloud-init

Container up

lxc init images:fedora/40/cloud dev
lxc config set dev cloud-init.user-data - < cloud-init.yml
lxc config set dev security.nesting true
lxc config set dev security.privileged true
lxc config set dev limits.cpu=4
lxc config set dev limits.memory=16GB
lxc config set dev raw.idmap "both 1000 1000"
@eternal-turtles
eternal-turtles / config.fish
Created September 27, 2017 08:54
dotfiles
set -gx TERM xterm-256color
set -gx HOMEBREW_GITHUB_API_TOKEN [EXTRACTED]
set -gx EDITOR /usr/local/bin/emacs
set -gx GIT_EDITOR /usr/bin/vi
# default macOS path: /usr/libexec/java_home
set -gx JAVA_HOME '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home'
# bash source /usr/local/bin/virtualenvwrapper.sh
@eternal-turtles
eternal-turtles / api.demo.example.net
Last active October 16, 2017 15:40
Example Nginx configuration for API server and JS frontend using Webpack
api.demo.example.net
upstream api.demo {
# server unix:///tmp/demo-api.sock;
server 127.0.0.1:7007;
}
server {
listen 80;
server_name www.api.demo.example.net api.demo.example.net;
@eternal-turtles
eternal-turtles / arch-linux-install
Created September 11, 2016 01:19 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@eternal-turtles
eternal-turtles / self_signed_cert.rb
Created September 6, 2016 07:18 — forked from nickyp/self_signed_cert.rb
create a self-signed certificate using ruby-openssl
require 'rubygems'
require 'openssl'
key = OpenSSL::PKey::RSA.new(1024)
public_key = key.public_key
subject = "/C=BE/O=Test/OU=Test/CN=Test"
cert = OpenSSL::X509::Certificate.new
cert.subject = cert.issuer = OpenSSL::X509::Name.parse(subject)
@eternal-turtles
eternal-turtles / centos-vbox-on-mac
Created October 12, 2015 04:25 — forked from mjwall/centos-vbox-on-mac
setup centos in virtualbox on mac osx
- install virtual box
- download minimal iso from http://yum.singlehop.com/CentOS/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso
- create vm, use redhat 64
- in settings, storage, point the controller IDE to the iso
- run it
- once it reboots, you need networking
- run dhclient eth0
- yum install system-config-network-tui
- run system-config-network-tui
- manually edit /etc/sysconfig/network-scripts/ifcfg-eth0
## Timecop
### A Library for Mocking Time, Date, and DateTime
* https://github.com/travisjeffery/timecop
* Mock:
* Time.now
* Date.today
* DateTime.now
#register {
-webkit-transform: translateX(-100.5vw) translateY(-45vh);
transform: translateX(-100.5vw) translateY(-45vh);
}
.show-modal {
margin: auto;
opacity: 1;
-webkit-transform: translateX(0) translateY(0) !important;
transform: translateX(0) translateY(0) !important;
/* ======================================================================
FONTS=
KERN=
========================================================================= */
// ( http://www.awayback.com/revised-font-stack/ )
// SANS-SERIF=
@optima: Optima, Segoe, "Segoe UI", Candara, Calibri, Arial, sans-serif;