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 type { ActionFunctionArgs, UploadHandler } from "@remix-run/node"; | |
import { | |
json, | |
unstable_createMemoryUploadHandler as createMemoryUploadHandler, | |
unstable_parseMultipartFormData as parseMultipartFormData, | |
} from "@remix-run/node"; | |
import { useFetcher } from "@remix-run/react"; | |
type ActionData = { | |
errorMsg?: string; |
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
FROM debian:bullseye | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install the minimum amount of packages required for testing, which currently means: | |
# - minimal set of packages required to run Python 3 | |
# - shipping versions of uWSGI and nginx (so that config files are put in the right places) | |
# Also, make sure we have a sane default locale inside the container | |
RUN apt-get update \ |
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
bundle config build.puma --with-pkg-config=$(brew --prefix openssl@1.1)/lib/pkgconfig | |
bundle install --redownload |
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
upstream app { | |
# Path to Puma SOCK file, as defined previously | |
# server unix:/home/deploy/appname/shared/sockets/puma.sock fail_timeout=0; | |
server unix:/Users/ericwalker/src/github.com/ewalk153/sample-rails-app/shared/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 4000; | |
server_name localhost; |
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
upstream backend { | |
server localhost:3000; | |
} | |
server { | |
listen 9000; | |
server_name localhost; | |
root /path_of_rails_app/public; | |
try_files $uri/index.html $uri @app; |
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
> RUBY_YJIT_ENABLE=1 ruby -e "puts RubyVM::YJIT.enabled?" | |
true | |
> ruby -e "puts RubyVM::YJIT.enabled?" | |
false |
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 unittest | |
from re import sub, match | |
from os.path import join, relpath | |
def echo(message): | |
# print(message) | |
pass | |
PIKU_INTERNAL_NGINX_STATIC_MAPPING = """ | |
location $static_url { |
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
# Google docs query command-line sample. | |
require 'google/apis/drive_v2' | |
require 'google/api_client/client_secrets' | |
require 'google/api_client/auth/installed_app' | |
require 'google/api_client/auth/storage' | |
require 'google/api_client/auth/storages/file_store' | |
require 'logger' | |
require 'json' |
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
# ❯ ruby foo_test.rb | |
# Run options: --seed 44288 | |
# # Running: | |
# F. | |
# Finished in 0.000679s, 2945.5069 runs/s, 2945.5069 assertions/s. | |
# 1) Failure: |
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
#include <sqlite3.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define MAX_FILE_SIZE 1000000 | |
// build with | |
// cc run_sqlite3_deserialize.c -lsqlite3 -o sqlite3_deserialize | |
// create db with: | |
// echo "create table pizza(name, color); insert into pizza(name, color) values ('margarita', 'red');" | sqlite3 pizza.db |
NewerOlder