Skip to content

Instantly share code, notes, and snippets.

View yspreen's full-sized avatar
🦆
Working

Nick Spreen yspreen

🦆
Working
View GitHub Profile
//
// ContentView.swift
//
// Created by @spreen_co on 11/13/22.
//
import SwiftUI
struct ContentView: View {
var body: some View {
@yspreen
yspreen / create_doppler_service_token.sh
Created July 24, 2022 11:07 — forked from ryan-blunden/create_doppler_service_token.sh
Crate a Doppler Service Token from the Command Line
#!/usr/bin/env bash
# Requires a CLI token
DOPPLER_TOKEN="$(doppler configure get token --plain)" \
DOPPLER_PROJECT="$(doppler configure get project --plain)" \
DOPPLER_CONFIG="$(doppler configure get config --plain)" \
\
SERVICE_TOKEN=$(curl -sS --request POST \
--url https://api.doppler.com/v3/configs/config/tokens \
@yspreen
yspreen / reflect.py
Created December 16, 2021 15:02 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@yspreen
yspreen / Image+Trim.swift
Created July 14, 2021 12:03 — forked from chriszielinski/Image+Trim.swift
[Swift 5] NSImage/UIImage Crop/Trim Transparency
// Image+Trim.swift
//
// Copyright © 2020 Christopher Zielinski.
// https://gist.github.com/chriszielinski/aec9a2f2ba54745dc715dd55f5718177
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@yspreen
yspreen / DictionaryKeyPath.swift
Last active November 30, 2022 22:41 — forked from dfrib/DictionaryKeyPath.swift
Swift: Reading and writing to (possible) nested dictionaries for a given key path, using a recursive approach
/*
Copyright 2022 @yspreen
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@yspreen
yspreen / mac_change.bat
Last active July 19, 2018 20:30 — forked from iJos/mac_change.bat
[BAT] Randomly change the Mac Address on Windows
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
SETLOCAL ENABLEEXTENSIONS
if "%~1"=="" goto blank
set /a x=0
::Generate and implement a random MAC address
FOR /F "tokens=1" %%a IN ('wmic nic where physicaladapter^=true get deviceid ^| findstr [0-9]') DO (
@yspreen
yspreen / index.html
Created January 1, 2017 14:11 — forked from anonymous/index.html
JSON Table Experiment
<div class="container">
<div class="col-md-12">
<table class="table table-striped head">
<thead>
<tr>
<th>Text</th>
<th style="text-align:right">Time</th>
</tr>
</thead>
</table>