Skip to content

Instantly share code, notes, and snippets.

@AtryFox
AtryFox / HandleGKeys.lua
Last active January 27, 2020 23:03
Handle Logitech G510 G-Keys as F13-F24 (seperate on all 3 M-layers)
-- Handles your G7-G18 keys as F13-F24.
-- M1 adds left-alt as modifier.
-- M2 adds left-ctrl as modifier.
-- M3 adds left-shift as modifier.
-- G1-G6 stay untouched.
function OnEvent(event, gkey, family)
mkey = GetMKeyState()
if family == "kb" or family == "lhc" then
@AtryFox
AtryFox / GetEmojiUrl.js
Created December 14, 2017 20:59
Simple script to get the url of an emoji. Requires Node.js and discord.js to run.
const Discord = require("discord.js");
const client = new Discord.Client();
const token = 'INSERT USER TOKEN HERE';
const emoji = 'INSERT EMOJI ID HERE';
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
console.log(client.emojis.get(emoji).url);
@AtryFox
AtryFox / BadDragonMeasurementConverter.user.js
Last active December 14, 2017 21:06 — forked from Ryotsuke/gist:adcb07a97d2ca2bb387d
Converts measurements on Bad Dragon from inches to cm.
// ==UserScript==
// @name BadDragon Measurement Converter
// @downloadURL https://deratrox.de/dev/UserScripts/BadDragonMeasurementConverter.user.js
// @author Ryotsuke@GitHub / DerAtrox@GitHub
// @namespace com.bad-dragon.measurement-converter
// @description Converts measurements on Bad Dragon from inches to cm.
// @include https://bad-dragon.com/*
// @version 2.5
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
@AtryFox
AtryFox / GetGuildEmojiStats.js
Last active March 23, 2019 14:04
Simple script to get custom server emoji usage counts for one guild. Requires Node.js and discord.js to run.
const Discord = require("discord.js");
const client = new Discord.Client();
const token = 'INSERT USER TOKEN HERE';
const guildid = 'INSERT GUILD ID HERE';
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
const guild = client.guilds.get(guildid);
@AtryFox
AtryFox / bindKeys.lua
Created June 17, 2017 12:52
Bind keys (for example F13 to F24) to your Logitech peripherals
function OnEvent(event, gkey, family)
mkey = GetMKeyState();
-- EXAMPLE: Bind F21 to G-Key 15 on Macro layer 1 on all connected Logitech keyboards
if (gkey == 15 and mkey == 1 and family == "kb") then
HandleKey("f21", event);
end
-- EXAMPLE: Bind F22 to G-Key 3 on all connected Logitech mice
@AtryFox
AtryFox / icons.jsx
Last active December 14, 2017 21:07
Photoshop Export Script
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@AtryFox
AtryFox / OvalPictureBox.cs
Created May 17, 2014 22:21
OvalPictureBox
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
public partial class OvalPictureBox : PictureBox {
public OvalPictureBox() {
this.BackColor = Color.DarkGray;
}
protected override void OnResize(EventArgs e) {