Skip to content

Instantly share code, notes, and snippets.

@fwang
fwang / circular-dependency.ts
Last active April 9, 2024 15:02
Demonstrate how to get around of circular dependencies in SST
import { Lazy } from "aws-cdk-lib";
import * as sst from "@serverless-stack/resources";
export class MainStack extends sst.Stack {
constructor(scope: sst.App, id: string) {
super(scope, id);
let site;
// Create Api
@ih2502mk
ih2502mk / list.md
Last active June 29, 2024 08:23
Quantopian Lectures Saved
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API

I bundled these up into groups and wrote some thoughts about why I ask them!

If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email carl.vitullo@gmail.com

Onboarding and the workplace

https://blog.vcarl.com/interview-questions-onboarding-workplace/

  • How long will it take to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?
@tomazzaman
tomazzaman / postgresql
Created September 20, 2016 11:43
PostgreSQL health check through xinetd (with repmgr)
# description: An xinetd service to show PSQL status
# put this file into /etc/xinetd.d
service postgrescheck
{
type = UNLISTED
flags = REUSE
wait = no
disable = no
socket_type = stream
protocol = tcp
@chrisblossom
chrisblossom / gist:8979722
Last active July 16, 2017 06:53
Packer Ansible-from-git-checkout Provisioner
### *** Contains some Ubuntu-specific commands/packages. Modify accordingly. ***
###
# scripts/ansible.sh
###
#!/usr/bin/env bash
# Ansible dependencies
@brihter
brihter / mysql_maintenance.sh
Last active December 19, 2015 21:09
MySQL maintenance snippets
##########
# EXPORT #
##########
# export db (schema only)
mysqldump -u username -ppassword --no-data --add-drop-database --databases db > db.sql
# export db
mysqldump -u username -ppassword --add-drop-database --databases db > db.sql
@adrienbrault
adrienbrault / purge.sh
Created September 24, 2012 10:02
Script to reduce VM size before packaging for vagrant
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@michiel
michiel / cors-nginx.conf
Created July 5, 2011 10:41
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#