Skip to content

Instantly share code, notes, and snippets.

View greglamb's full-sized avatar

Greg Lamb greglamb

View GitHub Profile
/* Source of MySQL Raytracer -- https://www.pouet.net/prod.php?which=83222
* Pasted here for convenience, see original for copyright information */
/* MySQL raytracing engine by Nick (holtsetio@gmail.com) */
Select if(repeat(char(
/* Parameters */
@w := 100, /* width of the output in pixels */
@h := 100, /* height of the output in pixels */
@cam.x := 0.0, /* x-position of the camera */
@cam.y := 0.0, /* y-position of the camera */
@IanColdwater
IanColdwater / twittermute.txt
Last active July 2, 2024 02:25
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@n055
n055 / vt420 guide.md
Last active September 21, 2021 02:03
Connecting a VT420 to a Linux PC

Connecting a VT420 to a Linux PC

Hardware

The DEC VT420 terminal only has 6P6C MMJ connectors. We need a converter to make this work with a standard serial to USB adapter. The originals are hard to find or expensive, but we can assemble one new.

  • D9 Female to DEC MMJ. You need to wire up the DE-9/DB9 plug's wires to the adapter's MMJ jack yourself. They actually sent me a DE-9 male adapter by mistake, so I ended up just using an easily obtainable DE-9 gender changer once I'd wired up the adapter.

  • MMJ Null Modem Cable. You could also use a cable that isn't a null modem cable, and use a null modem adapter/cable on the DE-9 side. Or, you could wire up the D9 to MMJ adapter to be null modem.

@legowerewolf
legowerewolf / hyperstart.bat
Last active December 29, 2023 16:45
Selecting a shell on startup in the Hyper terminal emulator
@ECHO off
:top
CLS
ECHO Choose a shell:
ECHO [1] cmd
ECHO [2] bash
ECHO [3] PowerShell
ECHO [4] Python
ECHO.
ECHO [5] restart elevated
@Red-Folder
Red-Folder / nuget.config
Last active July 29, 2023 15:42
Sample nuget.config to show how to add personal nuget server
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="NAME" value="FEEDURL" />
<add key="NuGet official package source" value="https://nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>
@jonschlinkert
jonschlinkert / open-iterm-from-finder.md
Last active May 24, 2022 01:33
Add an icon to your finder toolbar to open iTerm in the current folder.

Open iTerm from finder

The code and instructions in this gist are from http://peterdowns.com/posts/open-iterm-finder-service.html. I've had to do this a few times and wanted to distill it the basics.

  1. Open Automator
  2. Create an Application
  3. Choose Actions > Utilities > Run Applescript
  4. Paste the contents of open_in_iterm.app into the window.
  5. Save the script somewhere convenient
  6. Find the script, then drag the script onto the Finder window while holding the command key (or in Yosemite, the command + option keys)
@jamtur01
jamtur01 / ladder.md
Last active July 4, 2024 19:31
Kickstarter Engineering Ladder
@githubutilities
githubutilities / Uninstall-pkg.md
Last active July 3, 2024 18:55
Uninstall pkg manually in OS X

Mac Uninstall pkg Manually

  • using pkgutil
# list all your installed packages
pkgutil --pkgs

# show your package info
pkgutil --pkg-info 
@albertbori
albertbori / Installation.md
Last active July 8, 2024 02:05
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {