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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
ruby "3.2.2" | |
gem "aasm" | |
gem "after_commit_everywhere" | |
gem "apipie-rails", "0.9.4" | |
gem "argon2", ">= 2" |
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
def assert_equal(*args) | |
call_path = caller_locations(1, 1).first.path | |
call_line = caller_locations(1, 1).first.lineno | |
magic_enabled = args.length == 1 | |
if magic_enabled | |
expected_value = args.first | |
if expected_value.is_a?(String) || expected_value.is_a?(Symbol) || expected_value.is_a?(Numeric) | |
formatted_value = format_value(expected_value) |
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
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Setup pscale | |
uses: planetscale/setup-pscale-action@v1 | |
- name: Get Deploy Requests | |
if: github.event.pull_request.merged == true | |
env: | |
PLANETSCALE_SERVICE_TOKEN_ID: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_ID }} | |
PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }} |
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
Random stuff |
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
var data = new FormData(); | |
data.append('html', "<div class='box'>Success ✅</div>"); | |
data.append('css', ".box { border: 4px solid #03B875; padding: 20px; font-family:'Roboto';}"); | |
data.append('google_fonts', 'Roboto'); | |
var xhr = new XMLHttpRequest(); | |
xhr.open('POST', 'https://hcti.io/v1/image', true); | |
// Retrieve your api_id and api_key from the Dashboard. https://htmlcsstoimage.com/dashboard | |
xhr.setRequestHeader("Authorization", "Basic " + btoa("api_id:api_key")); |
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
workflow "Deploy master" { | |
on = "push" | |
resolves = [ | |
"alias", | |
] | |
} | |
action "install" { | |
uses = "actions/npm@94e6933" | |
args = "install" |
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
<?php | |
require 'vendor/autoload.php'; | |
$html = "<div class='ping'>Pong ✅</div>"; | |
$css = ".ping { padding: 20px; font-family: 'sans-serif'; }"; | |
// Retrieve user_id/api_key from https://htmlcsstoimage.com/dashboard | |
$client = new GuzzleHttp\Client(); | |
$res = $client->request('POST', 'https://hcti.io/v1/image', [ | |
'auth' => ['user_id', 'api_key'], |
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
# Retrieve your user id and api key from the Dashboard https://htmlcsstoimage.com/dashboard | |
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' | |
-d "html=<div class='ping'>Pong ✅</div>" | |
-d "css=.ping { padding: 20px; font-family: 'sans-serif'; }" |
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
var request = require('request'); | |
// Retrieve your user id and api key from the Dashboard https://htmlcsstoimage.com/dashboard | |
var auth = { user: "user_id", pass: "api_key" }; | |
var html = "<div class='ping'>Pong ✅</div>"; | |
var css = ".ping { padding: 20px; font-family: 'sans-serif'; }"; | |
var data = { html: html, css: css }; | |
request.post({ url: 'https://hcti.io/v1/image', form: data, auth: auth }, function(err, httpResponse, body) { | |
console.log(body); |
NewerOlder