Skip to content

Instantly share code, notes, and snippets.

View epsimatic's full-sized avatar

Oleg epsimatic

View GitHub Profile
require "rubygems"
require "rbosa"
if `ps aux`.match(/Things\.app/)
things = OSA.app('Things')
if things.lists[1].to_dos.size != 0
things.lists[1].to_dos.each {|todo|
`echo #{todo.name} | growlnotify -a Things`
}
end
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active June 8, 2026 07:26
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@ekreutz
ekreutz / ansible_variable_precedence.md
Last active May 7, 2026 12:22
Ansible variable precedence (order, hierarchy)
@lorenadl
lorenadl / rails_active_storage_how_to_validate_file_type.md
Last active November 17, 2025 23:24
[Rails] Active Storage how to validate file type

Rails Active Storage how to restrict uploadable file types

Active Storage doesn't have validations yet.

We can restrict the accepted file types in the form:

<div class="field">
  <%= f.label :deliverable %>
 &lt;%= f.file_field :deliverable, direct_upload: true,