Skip to content

Instantly share code, notes, and snippets.

<script src="https://gist.github.com/ArtskydJ/bad281a5cf02ccbb9258d5101873cdbe.js?file=test.jsx"></script>
@ArtskydJ
ArtskydJ / new-computer.md
Last active October 10, 2023 19:45
Setting up a new computer
@ArtskydJ
ArtskydJ / ip_address_and_integer_mapping.js
Last active March 6, 2023 20:46
Convert IP addresses to integers in javascript, similar to MySQL INET_NTOA and INET_ATON
// An earlier version did not work when the first part of the IP address was greater than 127. (e.g. '192.168.0.1')
// JS uses signed integers for bitshifting operations, which broke
// The issue is fixed now, but I really don't like my code.
// Maybe use this instead: https://gist.github.com/nethoncho/53b3b7e4dfe68a4de34f
const inet_ntoa = n => [3,2,1,0].map(i => ((n & (255 << (8 * i))) >>> 0) / Math.pow(256, i)).join('.')
const inet_aton = ip => ip.split('.', 4).map(Number).map((byte, i) => byte << (8 * (3 - i))).reduce((a, b) => a + b) >>> 0
inet_aton('10.0.5.9') // => 167773449
inet_ntoa(167773449) // => '10.0.5.9'
@ArtskydJ
ArtskydJ / SublimeLinter.sublime-settings
Last active July 2, 2022 23:01
Ignore fixable eslint rules in sublime text
// SublimeLinter Settings - User
{
"paths": {},
"linters": {
"eslint": {
// "selector": "text.html, source.js - meta.attribute-with-value",
"executable": "eslint",
// "executable": "eslint_d",
"args": [
"--ext=.js",
This file has been truncated, but you can view the full file.
[
{"kind":"youtube#playlistItem","etag":"4cPphYWYAWQdIit1MlSN2JiBtxc","id":"VVVRTDVBQlV2d1k3WW9XNWxnTXlBU193Lm5UZ0JvX2I5SHFF","snippet":{"publishedAt":"2022-04-22T16:28:09Z","channelId":"UCQL5ABUvwY7YoW5lgMyAS_w","title":"How to Stay Inspired for Life (realistically)","description":"Get Exclusive NordVPN deal here :https://NordVPN.com/wheezy. It’s risk free with Nord’s 30 day money-back guarantee!\n\n📰 Tuesbetter Newsletter! https://www.getrevue.co/profile/wheezywaiter\nGet a newsletter about stuff I'm working on and whatever's on my mind every Tuesday!\n\nMY USUAL PLACES\n🐦 Twitter http://twitter.com/Wheezywaiter \n🖼️ Instagram http://instagram.com/wheezywaiter\n🌐 Website http://wheezywaiter.com \n📱Tiktok https://www.tiktok.com/@wheezywaiter\n\nOTHER WHEEZY VIDEOS MENTIONED\nMy 1st Video https://www.youtube.com/watch?v=rximwk04BVY\nThe Most Inspiring Video on YouTube https://www.youtube.com/watch?v=bgSiU7-QyVQ\nThe Chum https://www.youtube.com/watch?v=s27pqdQwaOw\nFeelin' Lazy https://www.youtube.com/watch?

We can make Shipstations's "View address" dropdown automatically open with a bit of JavaScript.

There are browser extensions that you can type a bit of JS into, and they will run the JS every time that site is visited.

There are a bunch of extensions with varying levels of complexity.

To make the View-address dropdown auto-open...

// See also: https://github.com/ArtskydJ/vod-discord-bot
const config = {
token: `0OTc0MiSl.2cwzA.jVwNsVvMfhddF-_xOOp1_0MTE5gxMDIEKtHXMjg4M`, // FAKE
channelId: `2052824079084531`, // FAKE
}
const message = `message`
window.$ = function $(selector) {
return Array.prototype.slice.call(
document.querySelectorAll( selector )
)
}
@ArtskydJ
ArtskydJ / README.md
Created June 26, 2019 00:16
Make Rocket League Dual-Monitor

Use these scripts to make Rocket League work on your Dual Monitor setup.

Download them somewhere onto your computer.

If you have two 1920x1080, or two 1920x1200 screens, you do not need to modify the scripts at all.

If you have a different resolution, then change the numbers below. For example, if you have a pair of 2560x1440 screens, then you will have to change 1920 to 2560 in both files, and you will have to change 3840 to 5120 in both files