Discover gists
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 Initialize-EC2Disk { | |
param( | |
[parameter (mandatory=$true)][string] $InstanceId | |
) | |
$Commands = @( | |
'Get-Disk | ` | |
Where partitionstyle -eq "raw" | ` | |
Initialize-Disk -PartitionStyle MBR -PassThru | ` | |
New-Partition -AssignDriveLetter -UseMaximumSize | ` | |
Format-Volume -FileSystem NTFS -Confirm:$false -force' |
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 Get-Device() { | |
param( | |
[parameter (mandatory=$true)][string] $InstanceId | |
) | |
$CurrentDevice = Get-EC2InstanceAttribute $InstanceId -Attribute blockDeviceMapping | Select-Object -ExpandProperty BlockDeviceMappings | Select-Object -last 1 | |
If ($CurrentDevice.DeviceName -eq '/dev/sda1') { | |
$NewDevice = 'xvdf' | |
return $NewDevice | |
} | |
Else { |
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 * as anchor from "@coral-xyz/anchor"; | |
import { PublicKey, Transaction, ComputeBudgetProgram } from "@solana/web3.js"; | |
import * as token from "@solana/spl-token"; | |
const provider = anchor.AnchorProvider.env(); | |
anchor.setProvider(provider); | |
// Assumes your running with `anchor run closeAux --provider.cluster mainnet --provider.wallet ~/.config/solana/your-key.json` | |
const payer = provider.wallet["payer"]; |
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 -e | |
# | |
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the | |
# Docker daemon using a JSON config file. On Linux, this file is normally located at | |
# /etc/docker/daemon.json. You should use this JSON config method if you are running | |
# a version of Docker that is at least 1.10! | |
# Here is an example configuration that sets the docker0 bridge IP to 192.168.254.1/24: | |
# { | |
# "bip": "192.168.254.1/24" | |
# } |
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 | |
sudo mount -o remount,size=10G,noatime /tmp | |
echo "Done. Please use 'df -h' to make sure folder size is increased." |
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
戚小存 2012-06-06 14:27:31 | |
(谈不上非常原创,算是八卦的长总结吧。借鉴天涯贴《新布局史话——棋盘上属于天才的时代》、吴清源自传、桥本宇太郎自传、田壮壮电影《吴清源》的相关访谈、各位棋手的相关访谈以及川端康成的一些围棋相关作品。) | |
玩掉欧冠的晚上,我看完球开始看吴清源的自传《中的精神》。 | |
他的文笔很平,情感也很收敛。但是我向来不喜欢男人在码字上面玩太多花,码字也就跟下棋一样,你执着于某些精彩的段子,就无法搞出大格局。 | |
看他讲六合之棋,讲什么是中,什么是最善一手。触动极大,突然对整个围棋史好奇起来。 | |
我爹一直是个非常不入流的围棋爱好者,生平最好的战绩是街道围棋比赛季军,参赛人数为:五人。 | |
据我看,他棋品也一般,下棋的时候咋咋呼呼高声喧哗跟菜市场一样,更别说经常拿这个作为躲避洗碗的借口。 | |
“别慌,等我打完谱。” |
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
// export default interface Entity { | |
// fid?: string; // firestoreId | |
// delYn?: string; | |
// ... | |
// } | |
import Entity from '@/models/Entity'; | |
import {ReactNativeFirebase} from '@react-native-firebase/app'; | |
import firestore, { | |
FirebaseFirestoreTypes, |
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
# HG changeset patch | |
# User Dmitry Volyntsev <xeioex@nginx.com> | |
# Date 1714094993 25200 | |
# Thu Apr 25 18:29:53 2024 -0700 | |
# Node ID 99b1ca45f022879a13f18273ff108b145af4a87d | |
# Parent 83dc664adf0f6f101030fa50937c04d924b91103 | |
Fetch: fixed request Host header when port is non standard. | |
This fixes #707 issue on Github. |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace UTJ | |
{ | |
// Attach on "stretch" type anchor | |
public class UISafeArea : MonoBehaviour | |
{ |