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
/* | |
** Install raylib | |
Windows: https://github.com/raysan5/raylib/wiki/Working-on-Windows | |
Mac: https://github.com/raysan5/raylib/wiki/Working-on-macOS | |
Linux: https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux | |
** Example of how to compile the code with raylib using GCC on Mac | |
gcc -o hellogame hellogame.c -lraylib -framework OpenGL -framework Cocoa -framework IOKit | |
*/ |
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 ContentView: View { | |
@State private var image = UIImage() | |
@State private var buttonRect = CGRect() | |
@State private var isBrightBackground = false | |
@State private var viewID = UUID() | |
var body: some View { | |
NavigationStack { |
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 UIKit | |
import SwiftUI | |
struct ContentView: View { | |
@Environment(\.self) var environment | |
var body: some View { | |
ZStack { | |
Color.red.brighter(0.3, environment).edgesIgnoringSafeArea(.all) | |
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 ContentView: View { | |
@State var start = Date() | |
var body: some View { | |
TimelineView(.animation) { context in | |
let time = context.date.timeIntervalSince(start) / 120 | |
let rotation = 0.8 + 0.2 * abs((cos(.pi * time) + 1.0) / 2.0) | |
Canvas { context, size in |
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
Scream Tracker | |
<<<<< USERS MANUAL >>>>> | |
(C) 1990 Sami Tammilehto | |
============================================================================== |
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/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
global start | |
section .text | |
start: | |
push dword msg.len | |
push dword msg | |
push dword 1 | |
mov eax, 4 |
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
---- TidalCycles QUICK REFERENCE ---- | |
---------------------------------------------------------------- | |
-- To use in your editor after or alongside your code for quick reference | |
-- Work in progress, mostly to be used as basis for further documnentation work, sorry for the errors and omissions | |
-- designed with atom - monokai one dark vivid as theme | |
-- https://gist.github.com/mxactvtd/bf3fb357a419c7f063b98dfd9a66cf78 - check for update, I keep updating this quite often atm | |
---------------------------------------------------------------- | |
-- Some sources of Documentation -- | |
-- https://tidalcycles.org/patterns.html | |
-- https://tidalcycles.org/functions.html |
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 <algorithm> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
class Test { | |
public: | |
Test(string name) : name(fixName(name)) {} |
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 | |
import PlaygroundSupport | |
// NOTE: this example currently only works with US-based coordinates | |
// constants | |
// New York | |
let latitude = 40.709335 | |
let longitude = -73.956558 |
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 | |
import SafariServices | |
import PlaygroundSupport | |
// lil news api | |
let apiURL = "https://api.lil.software/news" | |
struct News: Codable { | |
var articles: [Article] | |
} |
NewerOlder