This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>local.KeyRemapping</string> | |
<key>ProgramArguments</key> | |
<array> | |
<!-- | |
Keychron K6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>local.KeyRemapping</string> | |
<key>ProgramArguments</key> | |
<array> | |
<!-- | |
Item 1: 0x39 (CapsLock) -> 0x29 (Esc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simple bot to echo events in a Twitch channel. | |
Need to fill out the data in the commands.Bot() call below to connect. | |
irc_token: You can get a token to use here by connecting your account here: https://twitchapps.com/tmi/ | |
client_id: Register a Twitch app and copy the client_id https://dev.twitch.tv/console/apps/create | |
nick: Your twitch username | |
initial_channels: the channels you wish to watch for events on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show() { | |
document.querySelector(".guilds-1SWlCJ") | |
.style = "display: inherit;" | |
window.serverBar.isVisible = true; | |
} | |
function hide() { | |
document.querySelector(".guilds-1SWlCJ") | |
.style = "display: none;" | |
window.serverBar.isVisible = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Simple script to switch Neocities configs for the CLI. | |
# Save tokens by copying "config" file to "config.<name>". | |
# Then use <name> to switch to that config. | |
# For example: | |
# $ mv ~/.config/neocities/config ~/.config/neocities/config.mysite | |
# | |
# With that in place you can now switch to it: | |
# $ neocities-switch mysite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getBeats() { | |
var now = new Date(); | |
return Math.floor((((now.getUTCHours() + 1) * 3600) + (now.getUTCMinutes() * 60) + now.getUTCSeconds()) / 86.4); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set __fish_git_prompt_showdirtystate 'yes' | |
set __fish_git_prompt_showstashstate 'yes' | |
set __fish_git_prompt_showuntrackedfiles 'yes' | |
set __fish_git_prompt_showupstream 'yes' | |
set __fish_git_prompt_color_branch yellow | |
set __fish_git_prompt_color_upstream_ahead green | |
set __fish_git_prompt_color_upstream_behind red | |
set __fish_git_prompt_color_prefix white | |
set __fish_git_prompt_color_suffix white |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import io | |
import json | |
import os | |
from django.core.files.storage import default_storage | |
import googlemaps | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# models.py | |
from .tasks import send_event | |
class Event(models.Model): | |
is_async = models.BooleanField(default=False) | |
# ... | |
def _send(self): | |
# do sending stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handle(self, *app_labels, **options): | |
# Generate a migrations manifest with latest migration on each app | |
super(Command, self).handle(*app_labels, **options) | |
loader = MigrationLoader(None, ignore_no_migrations=True) | |
with open("latest_migrations.manifest", 'w') as f: | |
f.write("\n".join(sorted(f"{a}: {m}" for a, m in loader.graph.leaf_nodes()))) |
NewerOlder