Skip to content

Instantly share code, notes, and snippets.

@mjbalcueva
mjbalcueva / calendar.tsx
Last active May 2, 2024 17:17
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
use aws_sdk_s3::{Client, Endpoint, Error, Region};
use http::Uri;
use awaitgroup::WaitGroup;
#[tokio::main]
async fn main() -> Result<(), Error> {
let bucket = "joshuarobinson";
let endpoint = "http://10.62.64.200";
let prefix = "";
@nickwild-999
nickwild-999 / aws-slf-s3.js
Last active December 30, 2023 19:41
S3 Multipart upload with presigned url and progress in React
// this is my aws serverless function
const serverless = require('serverless-http');
const express = require('express');
const AWS = require('aws-sdk');
const app = express();
app.use(express.urlencoded({ extended: true }));
@tekin
tekin / .gitattributes
Last active February 23, 2024 16:46
An example .gitattributes file that will configure custom hunk header patterns for some common languages and file formats. See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details.
# Stick this in your home directory and point your Global Git config at it by running:
#
# $ git config --global core.attributesfile ~/.gitattributes
#
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details
*.c diff=cpp
*.h diff=cpp
*.c++ diff=cpp
*.h++ diff=cpp
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@mossey
mossey / cloudSettings
Created July 10, 2018 16:58
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-07-10T16:58:55.808Z","extensionVersion":"v2.9.2"}
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active May 2, 2024 16:43
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@CJKinni
CJKinni / boxstarter.ps1
Last active December 31, 2020 03:18
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Chris Kinniburgh <chris@cjkinni.com>
# Based heavily on https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# by Jess Frazelle
# Last Updated: 2017-12-31
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
@jimmywarting
jimmywarting / readme.md
Last active April 30, 2024 21:38
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers