Skip to content

Instantly share code, notes, and snippets.

@seripap
seripap / settings.json
Created September 27, 2023 19:36
Zed Settings
{
"theme": "One Dark",
"base_keymap": "SublimeText",
"buffer_font_size": 16,
"buffer_font_family": "Operator Mono Book",
"autosave": "on_window_change",
"format_on_save": "on",
"formatter": "language_server",
"vim_mode": true,
"inlay_hints": {
@seripap
seripap / README.md
Last active August 9, 2023 14:45
Sync GitHub and Pierre.co

Sync GitHub Pull Requests to Pierre.co

Add secrets, PIERRE_RSA_KEY and PIERRE_RSA_KNOWN_HOSTS to your GitHub Actions secrets. Move these workflow files into .github/workflows to use them. This currently only syncs 1 user, could be updated to support multiple users. This is meant to help test Pierre as these scripts will continue to force push to Pierre.

PIERRE_RSA_KEY is your Pierre private key, PIERRE_RSA_KNOWN_HOSTS can be pulled using the following command: ssh-keyscan git.pierre.co, which looks something like

git.pierre.co ssh-rsa AAAA...
@seripap
seripap / graphql_introspection_query.graphql
Created November 30, 2022 20:01 — forked from a7v8x/graphql_introspection_query.graphql
GraphQL introspection query - for fetching the whole schema (from GraphiQL IDE) for https://atheros.ai/blog/graphql-introspection-and-introspection-queries
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
types {
...FullType
}
directives {
name
description
@seripap
seripap / README.md
Last active August 15, 2023 14:17
AWS Install and Configure Tailscale

One stop shop to install Tailscale on AWS Linux Distros.

/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/seripap/448757b042912eaa205ad7009148febd/raw/install.sh)"

Quick start

sudo tailscale up
@seripap
seripap / README.md
Last active April 2, 2021 15:27
Linear.app Slack Bot Autolinker

This is a Slack bot that automatically links to Linear.app issues. Sort of how like the Github autolinks work, except for Slack.

For example, you type Check out SE-12, the bot will then link to https://linear.app/{team}/se-12

@seripap
seripap / .muttrc
Created April 24, 2019 18:45 — forked from mickn/.muttrc
My Mutt Configuration (Gmail, Multiple Accounts, Not-Mutch Search, OfflineImap)
# Paths {{{
set folder = ~/Mail # mailbox location
set alias_file = ~/.mutt/alias # where to store aliases
set header_cache = ~/.mutt/cache/headers # where to store headers
set message_cachedir = ~/.mutt/cache/bodies # where to store bodies
set certificate_file = ~/.mutt/cerficates # where to store certs
set mailcap_path = ~/.mutt/mailcap # entries for filetypes
set tmpdir = ~/.mutt/temp # where to keep temp files
set signature = ~/.mutt/sig # my signature file
@seripap
seripap / insert.sql
Created March 18, 2019 18:41
State Parcel: Shortname, Longname, FIPS
INSERT into parcel_state values
(1, 'AL', 'Alabama', 1),
(2, 'AK', 'Alaska', 2),
(3, 'AZ', 'Arizona', 4),
(4, 'AR', 'Arkansas', 5),
(5, 'CA', 'California', 6),
(6, 'CO', 'Colorado', 8),
(7, 'CT', 'Connecticut', 9),
(8, 'DE', 'Delaware', 10),
(9, 'DC', 'District of Columbia', 11),
@seripap
seripap / README.md
Last active January 27, 2020 09:20
Chrome Headless PDF with Page Numbers

Getting page numbers using Chrome Headless

This is a small hack that adds a page numbers at the bottom of the page. Using Puppeteer and a fixed height, the page will render at an A4 size via web and have a fixed footer.

await page.goto('https://bl.ocks.org/seripap/raw/81241195e182b62adc3c87c27258f85f/', {waitUntil: 'networkidle'});
await page.pdf({
  path: 'hacks.pdf',
  format: 'A4'
});

Walkthrough of the following script (v8:6573).

var logFoo;
var promise1 = Promise.resolve().then( () => logFoo = () => console.log( "foo" ) );
promise1.then( () => logFoo() ).then( logFoo );

1. var logFoo;

  1. events.php
  • create event on inital load, update event afterwards. ?eventId=EVENT_ID to modify specific event.
  1. people.php
  • create person on initial load, update or delete person afterwards. ?personId=PERSON_ID to modify specific person.