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
#!/bin/bash | |
# Check if an argument is provided | |
if [ $# -eq 0 ]; then | |
echo "Usage: llm-pre 'string to prepend'" | |
exit 1 | |
fi | |
PREFIX="$1" |
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
using System; | |
using System.IO; | |
using JetBrains.Annotations; | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
using UnityEditor.iOS.Xcode; | |
using UnityEngine; | |
/** See Also: | |
- https://github.com/Mazyod/Unity-AutoBuilder |
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/local/bin/python3 | |
import json | |
from pprint import pprint | |
from collections import defaultdict | |
from pathlib import Path | |
def main(): | |
path = Path("./data.json").resolve() |
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
from typing import List | |
from datetime import datetime, timedelta | |
class PercentageCounter: | |
"""Counter for stepping percentages over an arbitrary number | |
e.g. total = 10, step = 0.15 (15%) | |
counter.next(1) # progress is 10%, returns nothing | |
counter.next(2) # progress is 20%, returns 15 | |
counter.next(3) # progress is 30%, returns nothing (has to exceed step) |
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 os | |
import logging | |
from queue import Queue, Empty as EmptyQueue | |
from time import sleep | |
from threading import Thread | |
from typing import List | |
logger = logging.getLogger("watchdog") |
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
#!/bin/bash | |
set -e | |
# required arguments: | |
# WORKSPACE_DIR=Networking.xcworkspace | |
# SCHEME_NAME=Networking | |
# PRODUCT_NAME=Networking | |
CONFIGURATION=Release |
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 flask | |
-from werkzeug.http import Headers | |
+import bottle | |
[ ... ] | |
+# Remove "hop-by-hop" headers (as defined by RFC2613, Section 13) | |
+# since they are not allowed by the WSGI standard. | |
+FILTER_HEADERS = [ | |
+ 'Connection', |
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
/** Safe area for status bar dodging only. If you use NavigationBars, this won't help. | |
*/ | |
let topConstraint: NSLayoutConstraint | |
if #available(iOS 11.0, *) { | |
topConstraint = headerContainerView.topAnchor.constraint(equalTo: safeAreaLayoutGuide.topAnchor) | |
} else { | |
let statusBarHeight = UIApplication.shared.statusBarFrame.height | |
topConstraint = headerContainerView.topAnchor.constraint(equalTo: topAnchor, constant: statusBarHeight) | |
} |
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
#!/bin/sh | |
set -e | |
CERT_NAME='3rd Party Mac Developer Application: [YOUR NAME]' | |
APP_NAME='mygame.app' | |
ENTITLEMENTS='mygame.entitlements' | |
# remove existing meta files | |
find ${APP_NAME} -type f -regex '.*meta' -delete |
NewerOlder