Skip to content

Instantly share code, notes, and snippets.

View nucleardreamer's full-sized avatar
🚀
obviously jammin'

Flynn Joffray nucleardreamer

🚀
obviously jammin'
View GitHub Profile
<?php
// Group detection by IP address
//
// [Region Abbreviation, Military/Government]
// Force Varnish to NEVER Cache this page
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
// JSON Headers
var _ = require('underscore'),
util = require('util');
// intercept stdout, passes thru callback
// also pass console.error thru stdout so it goes to callback too
// (stdout.write and stderr.write are both refs to the same stream.write function)
// returns an unhook() function, call when done intercepting
module.exports = function interceptStdout(callback) {
var old_stdout_write = process.stdout.write,
old_console_error = console.error;
@nucleardreamer
nucleardreamer / iosbuild.sh
Created December 21, 2015 21:10 — forked from reqshark/iosbuild.sh
libmill iOS cross-compile for 32 bit (armv7) and 64 bit (arm64) iOS, and i386 and x86_64 simulators
# Copyright (c) 2015 Bent Cardan
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the following conditions:
@nucleardreamer
nucleardreamer / arch-linux-install
Created August 11, 2016 21:12 — 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
@nucleardreamer
nucleardreamer / extruder1_end.gcode
Created January 3, 2019 20:53
MP Delta Mini Settings
M104 S0 ; turn off hotend heater
M140 S0 ; turn off bed heater
G91 ; Switch to use Relative Coordinates
G1 E-3 F700 ; retract the filament a bit before lifting the nozzle to release some of the pressure
G1 Z2 F1000 ; raise platform 2mm from current position
G1 E-2 F700 ; retract filament even more
G90 ; Switch back to using absolute coordinates
G28 X ; Return to home position. Without an X Y or Z after G28 the print completion time will not be displayed on the Mini Delta's display.
M84 ; disable motors
G4 S300 ; pause for 300 seconds to keep fan running to cool hotend and allow the fan to be turned off