- Open Automator
- Create a new Service
- Add a
Run Shell Script
action - Set input to Service receives selected
files or folders
inany application
- Set the script action to
/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@
- Set Pass input to
as arguments
- Save as
Open in Sublime Text
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
/* WooCommerce check for states Florida, Alabama, Georgia, Tennessee, South Carolina, North Carolina, | |
* Kentucky, Washington D.C., Virginia, and remove UPS 2nd Day Shipping rate if they are present in cart. | |
* Remove UPS 1-2 Day Ground for the rest of Continental U.S. Works for both WooThemes UPS Shipping and | |
* Syn Media UPS Shipping. | |
*/ | |
add_filter( 'woocommerce_package_rates', 'unset_ups_shipping_rates_for_specific_states' , 10, 2 ); | |
function unset_ups_shipping_rates_for_specific_states( $rates, $package ) { | |
// Setup an array of states that do not allow UPS Shipping 2nd Day Air. As of 10/18/2015 we added 3 days ground too. | |
$excluded_states = array( 'FL','AL','KY','LA','MS','TN','GA','SC','NC','KY','DC','VA','AR','CT','DE','IL','IN','KS','MA','ME','MD','MN','MI','MO','NH','NJ','NY','OH','OK','PA','RI','TX','VT','WV','WI' ); |
Cian Johnston, July 2017
A couple of weeks ago, I decided I should put my gaming rig to work crypto mining. I did not expect to make any significant profit on this, it was more of a fun project to set up. However, there were a large number of tutorials and guides already out there, and many were more than a year out of date.
This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.
The end result is an Ubuntu 16.04 LTS headless server running CUDA ethminer via systemd.
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
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ | |
/** | |
* 1. Set default font family to sans-serif. | |
* 2. Prevent iOS and IE text size adjust after device orientation change, | |
* without disabling user zoom. | |
*/ | |
html { | |
font-family: sans-serif; /* 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
The default Postgresql installation on Mac OS X using homebrew includes a single extension - plpgsql (PL/pgSQL procedural language) but there are a number of them available in the lib directory (/usr/local/Cellar/postgresql/9.2.1/lib on my machine) | |
To install an extension into the database, the easiest way I found was to open a database console using the 'rails db' command and then create it directly. I have seen mention of doing this in a Rails migration but this did not work for me. | |
Note that an extension is installed in a specific database, rather than being added to all databases. | |
The command to list the installed extensions is '\dx' | |
$ rails db | |
psql (9.2.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
'use client'; | |
import React, { useState } from 'react'; | |
import { Input } from '@/components/ui/input'; | |
import { cn } from '@/lib/utils'; | |
import { fetchFilteredPlaces } from '@/lib/data'; | |
export default function SearchDemo() { | |
const [query, setQuery] = useState(''); | |
const [departure, setDeparture] = useState(''); |