Skip to content

Instantly share code, notes, and snippets.

View wyan's full-sized avatar
👾
mingling with retro stuff, yearning for the VT52, still looking at the fnords

Alice Wyan wyan

👾
mingling with retro stuff, yearning for the VT52, still looking at the fnords
  • CIFP Camino de la Miranda
View GitHub Profile
@grawity
grawity / README.md
Created June 2, 2011 05:39
ADVENT magic mode script for TOPS-10-In-a-Box

This script was written for the TOPS-10-In-a-Box project. It calculates the passwords for Magic Mode in ADVENT, and is based on the one available at Zonadepruebas website.

Description copied from Zonadepruebas:

Don Woods, who deviced this authentication scheme 29 years ago, has given his kind permission to disclose it publically

'Advent' is reputedly the first text adventure game. It was originally created by William Crowthers, and later expanded by Don Woods. It was programmed in Fortran, on a DEC PDP-10 computer, and Woods' version dates from 1977. This first version has a maintenance feature called "Magic Mode". It was intended for administrators only, and involves a bizarre authentication process. After entering "MAGIC MODE" as first command in the game, the program will ask:

  1. "ARE YOU A WIZARD?", (replay "YES")
  2. "PROVE IT! SAY MAGIC WORD", (default is "DWARF")
@chrisl8888
chrisl8888 / rsync.sh
Last active December 13, 2019 05:14
rsync example
#!/bin/bash
# -r recursive
# -z use compression - turn this off if server need to conserve memory
# -t preserve modification times
# -p preserve permissions
# -l copy symlinks as symlinks
# Sync the files from the source to target folder and delete any extraneous folders
rsync -rvztpl --delete --stats --rsh=/usr/bin/ssh . sshalias:/var/sites/fooooobarbar.com
@jahewson
jahewson / smartos-on-a-budget.sh
Last active March 9, 2024 07:27
Installing and Configuring SmartOS on a budget server (with a /29)
# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date.
##################################################################
Installing and Configuring SmartOS on a budget server (with a /29)
##################################################################
# if you find this gist useful, please star it
# please be aware that budget hosting companies usually cut corners somewhere,
@textarcana
textarcana / centos-install-syntax-highlighting-in-less.sh
Last active May 1, 2023 01:01
2020 update: just use bat(1) instead!!!! bat has git integration and also can show invisible characters! OLD STUFF: How to enable syntax-highlighting in less. Use `less -N` (or type -N while in less) to enable line numbers. Based on the procedure described in http://superuser.com/questions/71588
# Enable syntax-highlighting in less.
# Last tested on CentOS 6.3.
#
# First, add these two lines to ~/.bashrc
# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
# export LESS=" -R "
sudo yum -y install boost boost-devel ctags
wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm
@baetheus
baetheus / README.md
Last active December 2, 2024 11:51
SmartOS Single IP with NAT using VLAN

WARNING

These intructions might work, but they need a bit of attention. I've been reading through ipf and smf documentation and have found a few ways to improve this process. When I have time I'll add that information here, until then, be sure to look into the ipf settings if you're having issues with routing. Good luck!

Foreword

This is a modified version of sjorge's instructions for Single IP with NAT. Those instructions can be found here: https://docu.blackdot.be/snipets/solaris/smartos-nat

The primary difference is that this version does not rely on etherstubs for internal switching, but instead uses a vlan configuration. The benefits of this method over using etherstubs are:

  1. Project Fifo (project-fifo.net) can create vms and zones with vlans, but does not currently have etherstub support.
  2. Vlan switching is supposedly more efficient than creating an etherstub to handle switching. I have not tested this statement.
@pichenettes
pichenettes / coefficient.py
Created November 3, 2014 23:17
Mapping an uint16_t to a value between 32 and 32768 with an exponential scale; with only 64 bytes of constant data
import numpy
import pylab
# coeff = numpy.exp(numpy.arange(65536) * numpy.log(1000) / 65536.0) * 32.768
# coarse_table = numpy.round(coeff[::4096])
# fine_table = numpy.round(coeff[:4096+256:256] / 32.768 * 32768)
coarse_table = [ 33, 50, 78, 120, 184, 284, 437, 673, 1036, 1596, 2457, 3784, 5827, 8973, 13818, 21279 ]
fine_table = [ 32768, 33664, 34585, 35531, 36503, 37501, 38527, 39580, 40663, 41775, 42918, 44092, 45298, 46536, 47809, 49117, 50460 ]
#********************************************************************
# CONFIGURAGION FILE FOR ADCD Z/OS 1.10 SUMMER *
#********************************************************************
# FOR ALL THE LOADPARM OPTIONS VISIT: *
# http://dtsc.dfw.ibm.com/MVSDS/'HTTPD2.ADCD.GLOBAL.HTML(READ110S)' *
#********************************************************************
# CUSTOM LOADPARM OPTIONS *
# SA - LOADS ALL LIBRARIES AND STARTS UP AUTOMATION (JES2) *
# J3 - LOADS ALL LIBRARIES AND STARTS UP BASIC z/OS SYSTEM (JES3) *
#********************************************************************
@joepie91
joepie91 / vpn.md
Last active May 13, 2025 02:51
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@gbaman
gbaman / HowToOTG.md
Last active May 9, 2025 20:48
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@dianedouglas
dianedouglas / testing.md
Last active October 31, 2021 21:20
Testing with Mocha and Chai from the command line

Testing from the commandline

First install the testing framework:

npm install mocha --save-dev
npm install chai --save-dev
npm install mocha -g