1. Launch and connect to EC2 instance running Amazon Linux 2.
2. Promote to root and edit /etc/ssh/sshd_config
## sudo vi /etc/ssh/sshd_config
3. Edit line 17 (usually 17) #PORT 22. You'll need to un-comment the line and change the port to whatever you like.
## PORT 9222
4. Save changes and exit
## :wq
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 bash | |
latest="8.0" | |
versions=("7.0" "7.1" "7.2" "7.4" "$latest") | |
valid=$(printf "|%s" "${versions[@]}") | |
switch="$1" | |
ERROR=$(tput setaf 1) | |
SUCCESS=$(tput setaf 2) | |
if [ -z "$switch" ] |
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
<!-- Modified from https://gist.github.com/NicholasKimuli/2b167ca1c6ce03cb860e3f89d17db1eb | |
Bonaire, Saba and Sint Eustatius may need a future flag update --> | |
<select class="input-block-level" id="countryCode" name="countryCode"> | |
<option data-countryCode="AF" value="93">🇦🇫 Afghanistan (+93)</option> | |
<option data-countryCode="AL" value="355">🇦🇽 Albania (+355)</option> | |
<option data-countryCode="DZ" value="213">🇩🇿 Algeria (+213)</option> | |
<option data-countryCode="AD" value="376">🇦🇩 Andorra (+376)</option> | |
<option data-countryCode="AO" value="244">🇦🇴 Angola (+244)</option> | |
<option data-countryCode="AI" value="1264">🇦🇮 Anguilla (+1264)</option> | |
<option data-countryCode="AG" value="1268">🇦🇬 Antigua & Barbuda (+1268)</option> |
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 { defineAsyncComponent } from 'vue' | |
const Content = defineAsyncComponent(() => import('./component-content.js')) | |
export default { | |
name: 'App', | |
components: { Content }, | |
template: /*html*/` | |
<Content /> | |
` |
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
# Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90 | |
# Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6 | |
namespace :db do | |
desc 'Dumps the database to backups' | |
task dump: :environment do | |
dump_fmt = ensure_format(ENV['format']) | |
dump_sfx = suffix_for_format(dump_fmt) | |
backup_dir = backup_directory(Rails.env, create: true) | |
full_path = nil | |
cmd = 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
# In our gemfile: | |
# gem 'rubyzip' | |
require 'zip' | |
# private ? | |
def process_and_create_zip_file | |
# Simulation of an object with has_many_attached :documents | |
job = Job.first.documents | |
# Tmp folder to store the download files from S3 |
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
/* | |
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
It will generate several classes such as: | |
.m-r-10 which gives margin-right 10 pixels. | |
.m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
.m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
.p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
.p-l-40 gives PADDING to the LEFT of 40 pixels |
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
<div id="{{form_outer_id}}" class="address__form relative w1 {{form_classes}}" style="display: none;"> | |
{% form 'customer_address', form_action %} | |
{% assign form_id = form.id %} | |
{% capture form_script %}{% if form_id == 'new' %}barrel.toggleNewForm(event){% else %}barrel.toggleForm(event, {{form_id}}){% endif %}{% endcapture %} | |
{% capture form_suffix %}{% if form_id and form_id != 'new' %}_{{form_id}}{% endif %}{% endcapture %} | |
{% capture form_city_id %}{% if form_id == 'new' %}AddressCityNew{% else %}AddressCity{% endif %}{% endcapture%} | |
{% capture form_country_id %}{% if form_id == 'new' %}AddressCountryNew{% else %}AddressCountry{% endif %}{% endcapture%} |
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
{"tree"=> | |
{"name"=>"Australia", | |
"value"=>39904, | |
"id"=>6, | |
"description"=>"", | |
"string_array"=>["one", "two"], | |
"array_with_hashes"=>[{"a"=>"1"}, {"a"=>"2"}], | |
"type"=>{"name"=>"Other", "icon"=>"<i class=\"fa fa-pagelines\"></i>"}, | |
"children"=> | |
[{"name"=>"Boxes", |
NewerOlder