Skip to content

Instantly share code, notes, and snippets.

View richy486's full-sized avatar
🐶
Experimenting

Richard Adem richy486

🐶
Experimenting
View GitHub Profile
@richy486
richy486 / new_mac.md
Last active April 17, 2024 14:45
New Mac

New Mac

Finder

Show file extensions

Finder > Settings, then click Advanced. Select or deselect "Show all filename extensions"

Hidden files

toggle:

@richy486
richy486 / A_SublimeSettings.md
Last active October 5, 2023 23:24
VSCode settings

VSCode settings

Stop the beeping

~/Library/KeyBindings/DefaultKeyBinding.dict

Key Bindings

~/Library/Application\ Support/Code/User/keybindings.json

Settings

@richy486
richy486 / youtube_m3u8.txt
Created January 6, 2017 21:16
get youtube streaming url
from: http://stackoverflow.com/a/35631022/667834
$ brew install youtube-dl
$ youtube-dl --list-formats https://www.youtube.com/watch\?v\=[YouTube video id]
shows something like:
....
91 mp4 144p HLS , h264, aac @ 48k
@richy486
richy486 / IdentityTest.swift
Created January 18, 2022 21:33
Animate between container views with `matchedGeometryEffect`
import SwiftUI
import PlaygroundSupport
// https://www.hackingwithswift.com/quick-start/swiftui/how-to-synchronize-animations-from-one-view-to-another-with-matchedgeometryeffect
struct AdaptiveStack<Content: View>: View {
var content: () -> Content
@Binding var vertical: Bool
init(vertical: Binding<Bool>, @ViewBuilder content: @escaping () -> Content) {
_vertical = vertical
@richy486
richy486 / Default (OSX).sublime-keymap
Last active April 8, 2021 10:53
Sublime settings
[
{ "keys": [ "ctrl+alt+m" ], "command": "un_pretty_json" },
{ "keys": [ "alt+m" ], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} },
{ "keys": [ "super+shift+j" ], "command": "reveal_in_side_bar" },
{ "keys": [ "super+ctrl+left" ], "command": "prev_view" },
{ "keys": [ "super+ctrl+right" ], "command": "next_view" },
{ "keys": [ "super+0"], "command": "reset_font_size" },
]
@richy486
richy486 / Unity_tools.py
Created January 10, 2017 18:03
Fix for Blender .blend files being loaded in Unity3D.
import bpy
bl_info = {
"name": "Unity Tools",
"author": "Karol \"Mirgar\" Głażewski",
"version": (1, 0, 2),
"blender": (2, 6, 5),
"location": "3D View > Tool Shelf > Unity Tools",
"description": "Tools to ease workflow with Unity Engine",
"warning": "",
@richy486
richy486 / FTButtonNode.swift
Created November 8, 2015 22:47
Button node for Sprite kit in swift 2.1
// Button node for Sprite kit in swift 2.1
// http://stackoverflow.com/questions/19082202/setting-up-buttons-in-skscene
import Foundation
import SpriteKit
class FTButtonNode: SKSpriteNode {
enum FTButtonActionType: Int {
case TouchUpInside = 1,
@richy486
richy486 / .bash_profile
Last active November 9, 2020 10:15
bash profile
# BASH PROFILE!!
# reload without closing terminal window with $ source ~/.bash_profile
# Alias'
export LSCOLORS="ExGxBxDxCxEgEdxbxgxcxd"
alias ls="ls -G -a -l"
alias glog="git log --graph --date-order --date=relative --color=always --oneline"
alias gstat="git status -s"
alias mm?="git branch --merged master"
alias cdd="rm -rf ~/Library/Developer/Xcode/DerivedData"
I found a few examples over the internet, enjoy:
http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8
http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes.m3u8 (AES encrypted)
http://playertest.longtailvideo.com/adaptive/captions/playlist.m3u8 (HLS stream with CEA-608 captions)
http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8 (with metadata)
http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8
http://cdn-fms.rbs.com.br/hls-vod/sample1_1500kbps.f4v.m3u8
@richy486
richy486 / astar.p8
Created December 17, 2015 22:09
A* pathfinding in pico-8
pico-8 cartridge // http://www.pico-8.com
version 5
__lua__
-- A* pathfinding
-- by @richy486
function _init()
printh("---------------")
printh("starting a star")