Here's a step-by-step to get started scripting Minecraft with Python on Mac OSX
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 | |
# prisma does not generate rollback (down script by default) | |
# this script will generate the down script for each migration | |
name=$1 | |
dir=$(pwd) | |
if [ -z "$name" ] | |
then |
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 template is inspired on https://github.com/basecamp/audits1984/blob/master/.rubocop.yml | |
# | |
# 1 - Add dependencies to group :development, :test | |
# gem "rubocop", "~> 1.26", require: false | |
# gem "rubocop-performance", require: false | |
# gem "rubocop-rails", require: false | |
# | |
# 2 - Create a file .rubocop.yml and add the lines below | |
# inherit_from: https://gist.githubusercontent.com/lazaronixon/7815d84702f277ead5e89c9f2aa5581f/raw/rubocop.yml | |
# |
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
<%= form_with(model: team) do |form| %> | |
<div> | |
<%= form.label :name %> | |
<%= form.text_field :name, class: "input" %> | |
</div> | |
<div> | |
<%= f.select :user_id, {}, {placeholder: "Select user"}, {class: "w-full", data: { controller: "select", select_url_value: users_path }} %> | |
</div> |
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
# rails app:template LOCATION='https://gist.github.com/davidtolsma/3af8f8961abe3a635e41776fe2f3af54/raw' | |
# This sets up docker for rails with nginx, postgres, redis, sidekiq, and action_cable | |
# rails 6.1 | |
# ruby 2.7.2 | |
# required gems: pg, redis, sidekiq | |
# requires config/sidekiq.yml config/initializers/sidekiq.rb cable/config.ru | |
create_file 'docker/nginx/Dockerfile' do <<~YAML |
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
volumes: | |
db_data: | |
version: '3.7' | |
services: | |
mysql: | |
container_name: mysql | |
image: mysql:5.7 | |
volumes: |
A Pen by Edward Lance Lorilla on CodePen.
- Website: https://stimulusjs.org/
- GitHub repo: https://github.com/stimulusjs/stimulus
- Handbook: https://stimulusjs.org/handbook/introduction
- Discourse: https://discourse.stimulusjs.org/
initialize
: once, when the controller is first instantiatedconnect
: anytime the controller is connected to the DOM
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
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
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/sh | |
# update glibc to 2.17 for CentOS 6 | |
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm | |
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm | |
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm | |
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm | |
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \ |
NewerOlder