Skip to content

Instantly share code, notes, and snippets.

View InukVT's full-sized avatar
🤔
Saving my monthly commit for something good

Inuk InukVT

🤔
Saving my monthly commit for something good
View GitHub Profile
// (C) TellowKitten Discord Swift
struct LinkedList<E> {
enum LinkedListNode {
case empty
indirect case full(E, next: LinkedListNode)
}
var head: LinkedListNode = .empty
rsnapshot {
host.hostname = "rsnapshot";
path = "/jails/rsnapshot";
allow.raw_sockets;
ip4.addr = 10.0.1.19; # 10.0.1 er network space i mit lokale network
devfs_ruleset="5";
mount.devfs;
exec.start = "/bin/sh /etc/rc";
exec.stop = "bin/sh /etc/rc.shutdown";
}
import Vapor
import Service
import Crypto
import Foundation
private var b2CacheKey = "__b2_authorization_token"
public struct B2Config: Service {
public let keyID: String
public let applicationID: String
{
"version": "1.0",
"identifier": "Apple_Demo",
"title": "Simple with Headline above Header Image",
"language": "en",
"layout": {
"columns": 7,
"width": 1024,
"margin": 70,
"gutter": 40
import SwiftUI
struct LoginView: View {
@State var username: String = ""
@State var password: String = ""
@State var loggedIn = false
@State var loginMessage: String = ""
public func upload(parts: [Content], url: uploadUrl) throws -> Future<Response> {
var b2Headers: [String: String] = ["Content-Type": "multipart/form-data; boundary=-123-"]
b2Headers["Content-Length"] = // Err... We'll figure this out later
let headers = HTTPHeaders(b2Headers.map { $0 })
let request = Request(using: self.client.container)
request.http.method = .POST
request.http.headers = headers
request.http.body = ""
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "pmchanger",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
@InukVT
InukVT / pong-ish.c
Last active October 15, 2019 19:32
#include <stdio.h>
#include <stdlib.h>
#include <SDL2/SDL.h>
enum PlayerNumber {one,two};
enum PlayerDirection {up, down, still};
typedef enum PlayerDirection BallYDirection;
typedef enum ballXDirection {left, right} BallXDirection;
@InukVT
InukVT / Vapor-project.sublime-project
Last active January 20, 2020 06:26
A nice project for us few who uses sublime to code Vapor sites
{
"folders":
[
{
"folder_exclude_patterns":
[
".*",
"docs",
"Sources",
"Tests"
let package = Package(
name: "Manga",
platforms: [.macOS(.v10_14)],
dependencies: [
...
.package(url: "https://github.com/JohnSundell/Plot.git", from: "0.5.0")
...
],
targets: [
.target(name: "App", dependencies: [