Skip to content

Instantly share code, notes, and snippets.

View ggamel's full-sized avatar
๐Ÿ‘๏ธ
โ€๐Ÿ‘„โ€โ€๐Ÿ‘

Greg Gamel ggamel

๐Ÿ‘๏ธ
โ€๐Ÿ‘„โ€โ€๐Ÿ‘
View GitHub Profile
import SwiftUI
import PlaygroundSupport
struct Screen: View {
var body: some View {
TabView {
InstagramHome().tabItem {
Image(systemName: "house.fill")
}
Text("Instagram").tabItem {
@nathanborror
nathanborror / ContentView.swift
Last active October 30, 2022 13:26
SwiftUI wrapper around Slack's PanModal (https://github.com/slackhq/PanModal)
import SwiftUI
import PanModal
struct ExampleView: View {
@State var detail: AnyView? = nil
@State var items: [String] = ["Detail 1", "Detail 2", "Detail 3"]
var body: some View {
NavigationView {
Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
import React from "react"
import { animated } from "react-spring"
import { Link } from "gatsby"
import "./nav.css"
const Nav = ({ style }) => (
<animated.nav style={style} className="nav">
<ul>
<li>
import React, { useState } from "react"
import PropTypes from "prop-types"
import { useSpring } from "react-spring"
import Header from "./header"
import Nav from "./nav"
import "./layout.css"
const Layout = ({ children }) => {
const [navOpen, toggleNavOpen] = useState(false)
@devnoname120
devnoname120 / My macOS setup.md
Last active July 14, 2025 18:01
My macOS setup

โ„น๏ธ Enable iCloud end-to-end encryption:

  • Nobody knows that, but iCloud actually supports end-to-end encryption (see โ€œAdvanced Data Protection for iCloudโ€) but it's disabled by default. If you care about data privacy, you should turn it on.
    • System settings โ†’ Apple ID โ†’ iCloud โ†’ Set Advanced Data Protection to On.
    • System settings โ†’ Apple ID โ†’ iCloud โ†’ Disable Access iCloud Data on the Web.
  • It supports almost all the native Apple apps, with the notable exceptions of iCloud Mail, Contacts, and Calendars. See official data protection matrix for more info.

Table of Contents

const path = require('path')
const ogs = require('open-graph-scraper')
const prompts = require('prompts')
const low = require('lowdb')
const FileSync = require('lowdb/adapters/FileSync')
const selectDB = [
{
type: 'select',
name: 'db',
@mxcl
mxcl / detweet.swift
Last active August 16, 2024 15:38
Delete all tweets and favorites older than two months ago. Instructions in comment.
#!/usr/bin/swift sh
import Foundation
import PromiseKit // @mxcl ~> 6.5
import Swifter // @mattdonnelly == b27a89
let swifter = Swifter(
consumerKey: "FILL",
consumerSecret: "ME",
oauthToken: "IN",
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html"

Fixing macOS 10.14, 10.15, 12

Dark main menu without the rest of dark mode

  1. Set Light mode
  2. defaults write -g NSRequiresAquaSystemAppearance -bool Yes
  3. Log out and log back in
  4. Set Dark mode
@marcedwards
marcedwards / loadingspinner.pde
Created May 30, 2018 02:25
A loading spinner with 6 dots
// A loading spinner with 6 dots.
// By @marcedwards from @bjango.
//
// Pretty messy and hacked together, but it works. ยฏ\_(ใƒ„)_/ยฏ
// Created using Processing 3.3.7.
float scaler = 0.24 * 4; // Scale the entire design.
float scalerb = 4; // Scale the entire design more.
int frame = 0;