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 Cocoa | |
class AutoGrowingTextField: NSTextField { | |
override var intrinsicContentSize: NSSize { | |
let size = super.intrinsicContentSize | |
var r = frame | |
r.size.height = 10000 | |
if let h = cell?.cellSize(forBounds: r).height { | |
return NSSize(width: size.width, height: h) |
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 Foundation | |
struct SendMail { | |
static let HOSTNAME = "smtp.gmail.com" | |
static let PORT: UInt32 = 465 | |
static let USERNAME = "[email protected]" | |
static let PASSWORD = "PASSWORD" | |
static let FROM = "[email protected]" |
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
#include QMK_KEYBOARD_H | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
/* ,-----------------------------------------------------------------------------------------. | |
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | | |
* |-----------------------------------------------------------------------------------------+ | |
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | | |
* |-----------------------------------------------------------------------------------------+ | |
* | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | |
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
if [ $# -ne 3 ]; then | |
if [ $# -ne 2 ]; then | |
echo "usage: make-xcframework PROJECT SCHEME PRODUCT_NAME" | |
else | |
PROJECT=$1 | |
SCHEME=$2 | |
PRODUCT_NAME=$2 | |
fi | |
else | |
PROJECT=$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
// | |
// ParallaxHeaderView.swift | |
// | |
// Created by nya on 2021/03/19. | |
// | |
import SwiftUI | |
import MXParallaxHeader | |
class ParallaxViewController: MXScrollViewController, MXScrollViewDelegate { |
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
/* Copyright 2020 sekigon-gonnoc | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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/zsh | |
# anaconda | |
source ~/opt/anaconda3/etc/profile.d/conda.sh | |
conda activate tecog | |
pip3 install -r requirements.txt | |
FFMPEG="/usr/local/bin/ffmpeg" | |
PYTHON="/usr/local/bin/python3" |
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/zsh | |
FFMPEG="/usr/local/bin/ffmpeg" | |
WAIFU="/usr/local/bin/waifu2x" | |
INPUT=$1 | |
OUTPUT=$2 | |
ID=`/usr/bin/uuidgen` | |
WORKDIR="/tmp/$ID" |
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
Future<List<User>> twitterLookup({ | |
required TwitterApi twitter, | |
List<String>? screenNames, | |
List<String>? userIds, | |
}) async { | |
var params = <String, String>{}; | |
if (screenNames != null) { | |
params['screen_name'] = screenNames.join(","); | |
} | |
if (userIds != null) { |
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
@OptIn(ExperimentalFoundationApi::class) | |
@Composable | |
fun LazyRowPager( | |
modifier: Modifier = Modifier, | |
listState: LazyListState = rememberLazyListState(), | |
onChangeCurrentIndex: ((Int) -> Unit)? = null, | |
contentPadding: Dp = 0.dp, | |
itemSpacing: Dp = 0.dp, | |
content: LazyListScope.(Dp) -> Unit, | |
) { |
OlderNewer