Skip to content

Instantly share code, notes, and snippets.

View jaimerodas's full-sized avatar

Jaime Rodas jaimerodas

View GitHub Profile
@mhuggins
mhuggins / multiparameter_attribute_assignment.rb
Last active September 5, 2020 19:41
MultiparameterAttributeAssignment
# app/models/concerns/multiparameter_attribute_assignment.rb
module MultiparameterAttributeAssignment
include ActiveModel::ForbiddenAttributesProtection
def initialize(params = {})
assign_attributes(params)
end
def assign_attributes(new_attributes)
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"
@viig99
viig99 / fiftyfootshadows.sh
Created July 11, 2012 12:52
Download Desktop Wallpapers from fiftyfootshadows.
# Author - Arjun Variar
# Thanks to Ben for introducing me to fiftyfootshadows, Awesome Wallpapers!!
#!/bin/sh
if [[ -z "$TMP" ]]
then
TMP="/private/tmp"
fi
dir="$HOME/fifty_downloads"