Skip to content

Instantly share code, notes, and snippets.

View jmadkins's full-sized avatar
🛰️
HTTP 418

Justin Adkins jmadkins

🛰️
HTTP 418
View GitHub Profile
@jmadkins
jmadkins / View.swift
Created September 1, 2023 04:04
SwiftUI - blended list background like Reminders app
List {
Section {
LazyVGrid(columns: [GridItem(.flexible()), GridItem(.flexible())], content: {
TileView(label: "Dave", icon: "house")
TileView(label: "Dave", icon: "house")
TileView(label: "Dave", icon: "house")
TileView(label: "Dave", icon: "house")
})
.listRowInsets(EdgeInsets())
.listRowBackground(Color.clear)
@jmadkins
jmadkins / commands
Created July 21, 2021 20:53
rails db tasks
Taken from: https://jacopretorius.net/2014/02/all-rails-db-rake-tasks-and-what-they-do.html
db:create Creates the database for the current RAILS_ENV environment. If RAILS_ENV is not specified it defaults to the development and test databases.
db:create:all Creates the database for all environments.
db:drop Drops the database for the current RAILS_ENV environment. If RAILS_ENV is not specified it defaults to the development and test databases.
db:drop:all Drops the database for all environments.
db:migrate Runs migrations for the current environment that have not run yet. By default it will run migrations only in the development environment.
db:migrate:redo Runs db:migrate:down and db:migrate:up or db:migrate:rollback and db:migrate:up depending on the specified migration.
@jmadkins
jmadkins / ContentView.swift
Created November 2, 2020 22:39
Style buttons like List
import SwiftUI
struct HomeHub: View {
var columns: [GridItem] = Array(repeating: .init(.flexible(), alignment: .center), count: 2)
var niceColor = Color(.sRGB, red: 150/255, green: 150/255, blue: 150/255, opacity: 0.1)
var body: some View {
NavigationView {
VStack {
MyWorkView()
@jmadkins
jmadkins / script.sh
Created August 30, 2020 02:00
Franklin county absentee labels download
wget -O labels.txt http://boelcd.franklincountyohio.gov/assets/components/ftp.cfc\?method\=getOverSFTP\&LocalPathName\=F%3A%5C%5CBOEL%5C%5Cpublic%5C%5Cdownloads%5C%5C\&RemotePathName\=%2Fpublic%2Fdownloads%2F\&FileName\=ABSENTEE_LABELS.txt\&Overwrite\=true\&Delete\=true
let mapleader = ","
" Code blocks (see below for more info)
getIP() -> {{
httpRequest({url: 'http://api.ipify.org/?format=json', json: true},
function(res) { Status.setMessage('IP: ' + res.ip); });
}}
" Displays your public IP address in the status bar
map <Leader>ip :call getIP<CR>