Skip to content

Instantly share code, notes, and snippets.

@wouldhide
wouldhide / .Dockerfile
Created June 9, 2022 20:36
Laravel Vapor docker runtime with MS SQL support. msodbc, mssql-tools, sqlsrv, pdo_sqlsrv
FROM laravelphp/vapor:php81
# Add the `unixodbc-dev` library
RUN apk --update add unixodbc-dev
# Download and install MSODBCSQL packages
# https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16#alpine18
RUN curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/msodbcsql18_18.0.1.1-1_amd64.apk
RUN curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/mssql-tools18_18.0.1.1-1_amd64.apk
RUN apk add --allow-untrusted msodbcsql18_18.0.1.1-1_amd64.apk
@samlambert
samlambert / management.md
Created January 9, 2021 00:16
Management @ PlanetScale

We want PlanetScale to be the best place to work. But every company says that, and very few deliver. Managers have a role in creating an amazing work experience, but things go awry when the wrong dynamic creeps in.

We have all seen those managers who collect people as “resources” or who control information as a way to gain “power.” In these cultures, people who “can’t” end up leading the charge. This is management mediocrity.

What will make us different? At PlanetScale, we won’t tolerate management mediocrity. We are building a culture where politics get you nowhere and impact gets you far. Managers are here to support people who get things done. They are as accountable to their team as their team is accountable to them.

We evaluate managers on the wellbeing and output of their team, how skillfully they collaborate with and influence others, and how inclusively and transparently they work.

You can expect your manager to:

  • Perceive a better version of you and support you in getting there
using UnityEngine;
public class MySceneBehaviour: MonoBehaviour {
private static MySceneParams loadSceneRegister = null;
public MySceneParams sceneParams;
public static void loadMyScene(MySceneParams sceneParams, System.Action<MySceneOutcome> callback) {
MySceneBehaviour.loadSceneRegister = sceneParams;
sceneParams.callback = callback;
UnityEngine.SceneManagement.SceneManager.LoadScene("MyScene");
@darconeous
darconeous / tesla-key-card-protocol.md
Last active January 29, 2025 06:49
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum [email protected].

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@neilhawkins
neilhawkins / list-of-salutations-titles-honorifics.txt
Last active August 27, 2024 11:21
List of salutations, honorifics, titles, Mr, Mrs, Sir in plain text
Mr
Mrs
Master
Miss
Ms
Mx
Dr
Admiral
Air Comm
Ambassador
@anderly
anderly / FilterMenu.vue
Last active August 16, 2019 16:17
Make Laravel Nova Per Page options configurable both globally and at resource level.
<template>
<dropdown
v-if="filters.length > 0 || softDeletes || !viaResource"
dusk="filter-selector"
class-whitelist="flatpickr-calendar"
>
<dropdown-trigger
slot-scope="{ toggle }"
:handle-click="toggle"
class="bg-30 px-3 border-2 border-30 rounded"
@compustar
compustar / hugin_stitch.bat
Last active June 16, 2021 12:49
Batch files for Hugin stitching for Mi Sphere or Madv360 with template (https://github.com/pxlartificer/XiaomiMijiaMi-HuginTemplate).
REM Usage: hugin_stitch.bat template-XiaomiMijiaMiJPG.pto IMG_20171231_172305.jpg
@echo off
SET PATH=%PATH%;C:\Program Files\Hugin\bin
FOR %%i IN ("%2") DO (
SET Name=%%~ni
)
pto_gen %2 %2 --output=%Name%_stitched.pto
@tobywf
tobywf / clean_old_lambda_versions.py
Last active September 9, 2024 17:50
A quick script to remove old AWS Lambda function versions
from __future__ import absolute_import, print_function, unicode_literals
import boto3
def clean_old_lambda_versions():
client = boto3.client('lambda')
functions = client.list_functions()['Functions']
for function in functions:
versions = client.list_versions_by_function(FunctionName=function['FunctionArn'])['Versions']
for version in versions:
@thomascube
thomascube / vtimezone.php
Last active February 15, 2023 21:15
VTIMEZONE component for a Olson timezone identifier with daylight transitions.Solution to this StackOverflow question: https://stackoverflow.com/questions/6682304/generating-an-icalender-vtimezone-component-from-phps-timezone-value/25971680
<?php
use \Sabre\VObject;
// use composer autoloader
require_once 'vendor/autoload.php';
/**
* Returns a VTIMEZONE component for a Olson timezone identifier
* with daylight transitions covering the given date range.
version: '3'
services:
redis:
image: redis
container_name: redis
postgres:
image: 'postgres'
container_name: postgres