This file contains hidden or 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
# ----------------------------------------------------------------------------- | |
# AI-powered Git Commit Function | |
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
# 1) gets the current staged changed diff | |
# 2) sends them to an LLM to write the git commit message | |
# 3) allows you to easily accept, edit, regenerate, cancel | |
# based on https://gist.github.com/karpathy/1dd0294ef9567971c1e4348a90d69285 | |
gcm() { | |
# Function to generate commit message |
This file contains hidden or 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
// Check if the browser supports push notifications. | |
if ("serviceWorker" in navigator && "PushManager" in window) { | |
try { | |
// Register the service worker. | |
const swReg = await navigator.serviceWorker.register("/sw.js"); | |
// Subscribe for push notifications. | |
const pushSubscription = await swReg.pushManager.subscribe({ | |
userVisibleOnly: true | |
}); |
This file contains hidden or 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
App.validator = | |
check: (str, regexp)-> | |
@[regexp].test str | |
url: /^(https?:)\/\/([a-z0-9]([-a-z0-9]*[a-z0-9])?\.)+([a-zA-z]{2,6})(\/[a-zA-Z0-9$_.+!#*(),;\/?:@&~=%-]*)?$/ | |
email: /^([\w\.\-\+\=]+)@((?:[a-z0-9\-_]+\.)+[a-z]{2,6})$/i |
This file contains hidden or 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
var _0x100000000000000 = 0x100000000000000, | |
_0x1000000000000 = 0x1000000000000, | |
_0x10000000000 = 0x10000000000, | |
_0x100000000 = 0x100000000, | |
_0x1000000 = 0x1000000, | |
_0x10000 = 0x10000, | |
_0x100 = 0x100, | |
_0xff = 0xff, | |
_0x80 = 0x80; |
This file contains hidden or 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
package { | |
import flash.events.EventDispatcher; | |
import flash.net.FileReference; | |
import flash.events.*; | |
import flash.external.ExternalInterface; | |
import ExternalCall; | |
internal class FileItem |