Skip to content

Instantly share code, notes, and snippets.

View gu3st's full-sized avatar
🥃
Just gotta get through this week

Dustin Dawes gu3st

🥃
Just gotta get through this week
View GitHub Profile
@steventroughtonsmith
steventroughtonsmith / FileBrowser.py
Created January 14, 2016 22:18
File Browser for Pythonista
# coding: utf-8
from UIKit import *
from Foundation import *
from ctypes import *
libobjc = CDLL('/usr/lib/libobjc.dylib')
QLPreviewController = ObjCClass('QLPreviewController')
@steventroughtonsmith
steventroughtonsmith / gist:52f0c6783446b6fc536e
Created January 17, 2016 06:49
NSExtensionSDK providers
AddressBookUI.framework
(
"com.apple.people-picker"
)
AudioToolbox.framework
(
"com.apple.AudioUnit",
"com.apple.AudioUnit-UI"
@mattgallagher
mattgallagher / ViewModel-ViewBinding.swift
Last active March 26, 2017 10:56
An abstract look at the View-Model/View-Binding pattern I frequently use in my projects and why this pattern uses the Swift `private` keyword.
// This file is an abstract representation of code that I use extensively in my apps
// for constructing and maintaining views. The reason the `private` keyword is used here
// is to control the interface between two entities (a function and a class) which typically
// reside in the same file.
//
// The function and the class implement a View-Binding and a View-Model. The two are largely
// representations of the *same* concepts – the latter from data perspective and the former
// from a view-infrastructure perspective. Their inter-relatedness makes it highly desirable to
// place them both in the same file – they may share many small types between them and they
// are perpetually co-evolving.
@developit
developit / *valoo.md
Last active November 13, 2023 08:39
🐻 Valoo: just the bare necessities of state management. 150b / 120b. https://npm.im/valoo

🐻 valoo

just the bare necessities of state management.

Usage

Hotlink it from https://unpkg.com/valoo.

See Interactive Codepen Demo.

@nims11
nims11 / d2_summarize_enemy.py
Created September 26, 2018 16:26
[Dota2] Helps you ban heroes by summarizing past games of the enemy
# Change the variables MY_ID and SERVER_FILE_PATH, and run this file
# The summary will be generated as soon as a game starts
import sys
import time
import os
import re
import requests
from multiprocessing import Pool
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
@dduan
dduan / SwiftChartPong.swift
Last active August 25, 2024 18:43
Pong Game implemented with Swift Charts.
import SwiftUI
import Charts
import Combine
import Foundation
final class GameState: ObservableObject {
struct Player {
var position: Int
var halfSize: Int = 150