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
-- AppleScript -- | |
-- This example is meant as a simple starting point to show how to get the information in the simplest available way. | |
-- Keep in mind that when asking for a `return` after another, only the first one will be output. | |
-- This method is as good as its JXA counterpart. | |
-- Chromium variants include "Google Chrome", "Chromium", "Opera", "Vivaldi", "Brave Browser", "Microsoft Edge". | |
-- Specific editions are valid, including "Google Chrome Canary", "Microsoft Edge Dev". | |
-- "Google Chrome" Example: | |
tell application "Google Chrome" to return title of active tab of front window |
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
library test_framework; | |
import 'package:unittest/unittest.dart'; | |
// RSpec like framework | |
typedef Closure(); | |
class Example { | |
String name; | |
Closure body; |
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
#!/bin/bash | |
# This script will describe the code of a Flutter app | |
# Get the path to the Flutter app | |
app_path=$(pwd)/lib | |
# Navigate to the app directory | |
cd $app_path |
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
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'bundler/setup' | |
require 'nostr' | |
require 'pry' | |
client = Nostr::Client.new | |
subscription = nil |
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
alias exs='exercism submit ${$(basename $PWD.go)//-/_}' |
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
brew update && \ | |
asdf plugin update ruby && \ | |
asdf install ruby 3.0.3 |
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
# Replace api_app_1 with the name of your container | |
docker inspect --format="{{.Id}}" api_app_1 |
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
# day is Numeric | |
# month is String | |
# year us Numeric | |
def zeller(day,month,year) | |
days = ['Saturday','Sunday','Monday','Tuesday','Wednesday','Thursday','Friday'] | |
case month | |
when 'January' |
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
# Install the gem | |
`gem install hirb` | |
# Find the gem's location | |
gem_path = ENV['GEM_HOME'] + '/gems/hirb-0.7.3/lib' | |
$: << gem_path | |
# Require it | |
require 'hirb' |
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
# Download the alpine image, which is more than 50% smaller than the base image | |
docker pull postgres:12.3-alpine | |
# macros is a the name of your app. My app is called "macros". | |
# One volume per app ensures that we can isolate and back it up independently | |
docker volume create macros | |
docker run --name postgres \ | |
-e POSTGRES_PASSWORD=postgres -d -p 5432:5432 \ | |
-v macros:/var/lib/postgresql/data postgres:12.3-alpine |