Skip to content

Instantly share code, notes, and snippets.

View shanecowherd's full-sized avatar

Shane Cowherd shanecowherd

  • Cowherd.com, Making Blocks, PBSCO, Bulb, BombBomb, Echo1612
  • Colorado Springs
  • 04:21 (UTC -07:00)
View GitHub Profile
@KhaosT
KhaosT / Cloud Gaming on Apple Vision Pro.md
Last active November 5, 2024 19:29
Guide for clouding gaming on Apple Vision Pro

Cloud Gaming on Apple Vision Pro

GeForce Now

Cloud Gaming is a great way to enjoy graphically demanding games on Apple Vision Pro.

Since Safari on visionOS does not support PWA mode, here is how you can access cloud gaming services on Apple Vision Pro.

What’s needed

@rcarmo
rcarmo / bt-agent.service
Last active December 12, 2023 13:14
Set up PAN networking on Raspbian Stretch (use sudo to create these files and run all commands)
# in /etc/systemd/system
[Unit]
Description=Bluetooth Agent
[Service]
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput
Type=simple
[Install]
WantedBy=multi-user.target
@israelcrux
israelcrux / save-and-restore-contenteditable-selection.js
Last active January 14, 2024 13:58
Save and Restore DOM text selection
function saveSelection() {
if (window.getSelection) {
var sel = window.getSelection();
if (sel.getRangeAt && sel.rangeCount) {
return sel.getRangeAt(0);
}
} else if (document.selection && document.selection.createRange) {
return document.selection.createRange();
}
return null;
@gblancogarcia
gblancogarcia / CircleNode.swift
Created January 3, 2016 14:26
SpriteKit: creating a resizable circle with a ripple effect animation
import SpriteKit
class CircleNode: SKShapeNode {
var radius: CGFloat {
didSet {
self.path = CircleNode.path(self.radius)
}
}
@boolkybear
boolkybear / multilinesegmentedcontrol.swift
Created January 28, 2015 09:21
Multiline UISegmentedControl
extension UISegmentedControl
{
func makeMultiline(numberOfLines: Int)
{
for segment in self.subviews
{
let labels = segment.subviews.filter { $0 is UILabel } // [AnyObject]
labels.map { ($0 as UILabel).numberOfLines = numberOfLines }
}
}
@iamjason
iamjason / UIImage+Tinting.swift
Last active December 10, 2019 21:59
Swift UIImage extension for tinting images
/**
Usage:
let originalImage = UIImage(named: "cat")
let tintedImage = originalImage.tintWithColor(UIColor(red: 0.9, green: 0.7, blue: 0.4, alpha: 1.0))
*/
extension UIImage {
func tintWithColor(color:UIColor)->UIImage {
@eternalstorms
eternalstorms / Apple Evangelists.txt
Created June 12, 2013 09:07
Apple Evangelists (WWDC 2013)
UI- and App Frameworks Evangelist - Jake Behrens, [email protected], twitter: @Behrens
- What's new in Cocoa
- Accessibility in iOS
- Building User Interfaces for iOS 7
- Getting Started with UIKit Dynamics
- What's new in Cocoa Touch
- What's New With Multitasking
- Best Practices for Cocoa Animation
- Improving Power Efficiency with App Nap
- Introducing Text Kit
@maxlapshin
maxlapshin / capture_raw_frames.c
Created September 30, 2011 11:50
v4l2 capture example
/*
* V4L2 video capture example
*
* This program can be used and distributed without restrictions.
*
* This program is provided with the V4L2 API
* see http://linuxtv.org/docs.php for more information
*/
#include <stdio.h>