This file contains 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
Moved to https://github.com/fuzz/crossplane-setup/blob/main/crossplane-setup.sh |
This file contains 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
There's a coder who's sure | |
All that glitters is gems | |
And she's writing a stairway to main:Object heaven | |
When she gets there she knows | |
If the blocks are all closed | |
She can return the last evaluated expression | |
Ooh ooh ooh | |
Ooh ooh ooh | |
And she's writing a stairway to main:Object heaven |
This file contains 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
# migration | |
class CreateOfferings < ActiveRecord::Migration[6.0] | |
def change | |
create_table :offerings do |t| | |
t.references :product, foreign_key: true | |
t.references :vendor, foreign_key: true | |
# add other unique-to-vendor fields/associations | |
t.timestamps | |
end |
This file contains 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
import Control.Exception | |
import System.Posix.Files (FileStatus, getSymbolicLinkStatus) | |
filePathExist :: FilePath -> IO Bool | |
filePathExist fp = do | |
x <- try (getSymbolicLinkStatus fp) :: IO (Either IOError FileStatus) | |
case x of | |
Left _ -> return False | |
Right _ -> return True | |
{- |