Skip to content

Instantly share code, notes, and snippets.

@dombarnes
dombarnes / Dockerfile
Created January 1, 2024 23:04
My current Rails/Docker/Azure CI pipeline
FROM ruby:3.2.2-alpine3.18 as dependencies
ARG RAILS_ENV=production
ARG RAILS_LOG_TO_STDOUT=true
ARG RAILS_SERVE_STATIC_FILES=true
ARG RAILS_MASTER_KEY=''
ARG OAUTH_CLIENT_ID=''
ARG OAUTH_CLIENT_SECRET=''
ARG OAUTH_SERVER=''
ARG PORT=3000
@dombarnes
dombarnes / gist:1892164
Created February 23, 2012 10:31
iTunes Gift URL
https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/com.apple.jingle.app.finance.DirectAction/freeProductCodeWizard?code=VOUCHERCODE&mt=8
@dombarnes
dombarnes / DarkModeToggle.vue
Created September 12, 2023 00:14
Dark Mode Toggle Vue 3 Component with System-based Option
<template>
<div class="flex flex-col">
<div class="flex items-center">
<label class="switch">
<input ref="darkModeToggle" type="checkbox" name="dark-mode" v-model="darkMode" @change="toggleMode" :disabled="useSystemSetting">
<span class="slider round"></span>
</label>
<label>Dark Mode</label>
</div>
<label class="m-1">
@dombarnes
dombarnes / BuildIPAForTestFlight.yml
Created June 22, 2023 21:49
Azure Devops YAML Pipeline for Xcode build and delivery to Testflight
parameters:
- name: "platforms"
type: object
default: {}
jobs:
- ${{ each platform in parameters.platforms }}:
- job: BuildIPAForTestFlight_${{platform}}
steps:
- task: DownloadSecureFile@1
@dombarnes
dombarnes / azure-pipelines.yml
Created April 6, 2023 20:14
Azure DevOps Pipeline for deploying NuxtJS 3 to Azure Static Web Apps
# Node.js with Vue
# Build a Node.js project that uses Vue.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- main
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
@dombarnes
dombarnes / .bash_profile
Created March 15, 2013 09:43
Bash alias to switch Software Update Servers
# Switch to Work SUS
alias suwiki="sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL 'http://server.domain.tld:8088/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog'"
alias suapple="sudo defaults delete /Library/Preferences/com.apple.SoftwareUpdate CatalogURL"
@dombarnes
dombarnes / build-stage.rb
Created December 7, 2015 22:10
Xcode Build Stage for incrementing build number based on git commits From http://blog.soff.es/automated-bundle-version
git = `sh /etc/profile; which git`.chomp
app_build = `#{git} rev-list --all | wc -l`.chomp.to_i
`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion #{app_build}" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"`
puts "Updated #{ENV['TARGET_BUILD_DIR']}/#{ENV['INFOPLIST_PATH']}"
@dombarnes
dombarnes / benderplus
Created November 24, 2015 11:31 — forked from anotherspot/benderplus
A modified script for robot clouds bender to include Mavericks Server backups of Service Databases
#!/bin/bash
# Bender
# Written by Chad Nielsen
# Forget Computers, Get Creative!
# Version History
# 1.0 - Initial creation of script for use with a companion launch daemon.
# 1.1 - Moved binary and log locations to /usr/local/robotcloud.
# 1.2 - Code improvements and added compatibility with OS X 10.9 Mavericks.
@dombarnes
dombarnes / gist:3296669
Created August 8, 2012 17:02
DayOne console error
08/08/2012 18:01:02.679 Day One[3122]: Could not find image named 'navitem-background-standard'.
08/08/2012 18:01:02.796 Day One[3122]: *** WARNING: -[NSImage compositeToPoint:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
@dombarnes
dombarnes / gist:3296608
Created August 8, 2012 16:50
Slogger_image.rb output
ruby ~/Projects/Slogger/slogger_image.rb /Users/domster83/Dropbox/ifttt/instagram/f7f9c2aae15e11e193de22000a1d011e_7.jpg
<CGColor 0x7ff19b418b50> [<CGColorSpace 0x7ff19b415130> (kCGColorSpaceDeviceRGB)] ( 0 0 0 1 )