Skip to content

Instantly share code, notes, and snippets.

View lukescammell's full-sized avatar

Luke Scammell lukescammell

View GitHub Profile
@fevangelou
fevangelou / install_nano_on_macos_without_homebrew.sh
Last active January 3, 2024 14:43
Install Nano Editor (with syntax highlighting) on MacOS without using Homebrew [updated Jan 2024]
#!/bin/bash
# Install Nano Editor (with syntax highlighting) on MacOS without using Homebrew
# You can get the latest version number from https://www.nano-editor.org
# Instructions:
# - First off, download this Bash script from the browser & make it executable:
# $ chmod +x install_nano_on_macos_without_homebrew.sh
# - If you have "wget" installed (you most likely do), just run the script with:
# $ ./install_nano_on_macos_without_homebrew.sh
@lukescammell
lukescammell / user-profile.cmd
Last active October 10, 2022 19:29
This enables portable SSH keys in cmder, enabling you to have full SSH access using cmder portably on a USB (for example). Please note that when you ssh-keygen, it will still default to %USERPROFILE%, so you will either have to change the path on generation, or manually move the keys to your %CMDER_ROOT%\config\.ssh directory.
:: use this file to run your own startup commands
:: use in front of the command to prevent printing the command
:: call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"
:: set "PATH=%CMDER_ROOT%\vendor\whatever;%PATH%"
:: LS 2017-09-12_17.35.11
:: ======================
:: Copied from %CMDER_ROOT%\vendor\init.bat
@garywoodfine
garywoodfine / pbcopyfy
Last active May 6, 2023 20:22
Simple Script to configure pbcopy like functionality on ubuntu
#!/bin/sh
# Copyright (C) 2009-2017 Three Nine Consulting
# Always good practice to update packages. However ask user if they would like to do so
# For explanation on how this works and why check out https://garywoodfine.com/use-pbcopy-on-ubuntu/
read -p "Do you want to update your package repositories before proceeding ? " -n 1 -r
echo #adding new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
fi
[
{
"backcolor": "#7cccd6",
"name": "MiniVan 40%",
"author": "Luke Scammell",
"switchMount": "cherry",
"switchBrand": "gateron",
"switchType": "KS-3-White",
"plate": true
},
@lukescammell
lukescammell / MiniVan-40_-_-Arrow-Layout.kbd.json
Last active July 30, 2021 23:29
MiniVan 40% – Arrow Layout
[
{
"backcolor": "#7cccd6",
"name": "MiniVan 40% – Arrow Layout",
"author": "Luke Scammell",
"switchMount": "cherry",
"switchBrand": "gateron",
"switchType": "KS-3-White",
"plate": true
},
@lukescammell
lukescammell / RedScarf-III-84-_RS84_-_-visual.kbd.json
Last active September 22, 2017 13:16
RedScarf III 84 (RS84) – visual
[
{
"backcolor": "#111111",
"name": "RedScarf III 84 (RS84) – visual",
"author": "Luke Scammell",
"switchMount": "cherry",
"switchBrand": "gateron",
"switchType": "KS-3-White",
"plate": true
},
@IMcPwn
IMcPwn / delete-all-messages.js
Last active July 12, 2023 19:41 — forked from niahoo/delete-all-messages.js
Delete all messages in a Discord channel
// Turn on Developer Mode under User Settings > Appearance > Developer Mode (at the bottom)
// Then open the channel you wish to delete all of the messages (could be a DM) and click the three dots on the far right.
// Click "Copy ID" and paste that instead of LAST_MESSAGE_ID.
// Copy / paste the below script into the JavaScript console.
// If you're in a DM you will receive a 403 error for every message the other user sent (you don't have permission to delete their messages).
var before = 'LAST_MESSAGE_ID';
clearMessages = function(){
const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, "");
const channel = window.location.href.split('/').pop();
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@tsvensen
tsvensen / image-replacement.css
Last active December 23, 2019 11:46
Image Replacement Technique
/* http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ */
overflow: hidden;
text-indent: 100%;
white-space: nowrap;