This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local INSTALL_URL = "https://github.com/Hammerspoon/Spoons/raw/refs/heads/master/Spoons/SpoonInstall.spoon.zip" | |
| local spoons_dir = hs.configdir .. "/Spoons" | |
| local install_dir = spoons_dir .. "/SpoonInstall.spoon" | |
| local zip_file = install_dir .. ".zip" | |
| if hs.fs.attributes(install_dir) == nil then | |
| hs.fs.mkdir(spoons_dir) | |
| local unpack = hs.task.new("/usr/bin/unzip", function(exit_code, _stdout, stderr) | |
| if exit_code ~= 0 then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| cmd=$* | |
| authorize() { | |
| for host | |
| do xhost | egrep -q "^INET6?:$host$" || xhost + $host | |
| done | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| if [ -z "$1" ]; then | |
| cat <<-END_OF_HELP | |
| wait_for | |
| Usage: | |
| wait_for FILE | |
| Checks for existance of file repeatedly until it succeeds then it exits. File |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :db do | |
| task :load_config do | |
| ActiveRecord::Base.configurations = ActiveRecord::Tasks::DatabaseTasks.database_configuration || {} | |
| ActiveRecord::Migrator.migrations_paths = ActiveRecord::Tasks::DatabaseTasks.migrations_paths | |
| if defined?(ENGINE_PATH) && engine = Rails::Engine.find(ENGINE_PATH) | |
| if engine.paths['db/migrate'].existent | |
| ActiveRecord::Migrator.migrations_paths += engine.paths['db/migrate'].to_a | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler' | |
| Bundler.setup :default | |
| require 'sinatra/base' | |
| require 'sprockets' | |
| require './app' | |
| map '/assets' do | |
| environment = Sprockets::Environment.new | |
| environment.append_path 'assets/javascripts' | |
| environment.append_path 'assets/stylesheets' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |