- Catalina
- Big Sur
- Monterey
- Ventura
- Sonoma
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
{ | |
"0":{ | |
"day":{ | |
"description":"Sunny", | |
"image":"http://openweathermap.org/img/wn/01d@2x.png" | |
}, | |
"night":{ | |
"description":"Clear", | |
"image":"http://openweathermap.org/img/wn/01n@2x.png" | |
} |
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 SwiftUI | |
struct HalfShape: Shape { | |
let left: Bool | |
func path(in rect: CGRect) -> Path { | |
return Path { path in | |
let width = rect.width | |
let height = rect.height |
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
# Guitar Strumming - by Emlyn | |
# This tries to work out the guitar (or ukulele etc.) fingering for arbitrary chords (and tuning). | |
# It seems to work reasonably well for basic chords, but is quite naive and probably makes many mistakes. | |
# Ideas, bug reports, fixes etc. gratefully received, just comment below, or tweet @emlyn77. | |
# Feel free to make use of this code as you like (with attribution if you feel like it, but you don't have to). | |
# Thanks to @Project_Hell_CK for fixing the tuning, and spotting that it gets chord(:f, :major) not quite right. | |
# Next note higher or equal to base note n, that is in the chord c | |
define :next_note do |n, c| | |
# Make sure n is a number |
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
const puppeteer = require('puppeteer'); | |
const prettier = require('prettier'); | |
const atob = require('atob'); | |
const btoa = require('btoa'); | |
const scriptUrlPatterns = [ | |
'*' | |
] | |
const requestCache = new Map(); |
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 asyncio | |
from enum import Enum | |
HOST = "127.0.0.1" | |
PORT = 62775 | |
class Commands(Enum): | |
LOGOUT = 1 | |
SHUTDOWN = 2 |
-
Ensure hypervisor functionality is enabled in BIOS.
- I know it sounds stupid, but if you already have it enabled, disable it, restart the machine, and enable it again.
- Otherwise you will hit microsoft/WSL#5363
-
Launch a PowerShell prompt in Administrator mode [Win+X > Windows PowerShell (Admin)]
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
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 { LiquidityPoolKeysV4, MARKET_STATE_LAYOUT_V3, Market, TOKEN_PROGRAM_ID } from "@raydium-io/raydium-sdk"; | |
import { Connection, Logs, ParsedInnerInstruction, ParsedInstruction, ParsedTransactionWithMeta, PartiallyDecodedInstruction, PublicKey } from "@solana/web3.js"; | |
const RPC_ENDPOINT = 'https://api.mainnet-beta.solana.com'; | |
const RAYDIUM_POOL_V4_PROGRAM_ID = '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8'; | |
const SERUM_OPENBOOK_PROGRAM_ID = 'srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX'; | |
const SOL_MINT = 'So11111111111111111111111111111111111111112'; | |
const SOL_DECIMALS = 9; | |
const connection = new Connection(RPC_ENDPOINT); |
NewerOlder