Skip to content

Instantly share code, notes, and snippets.

View acro5piano's full-sized avatar
🏠
Working from home

Kay Gosho acro5piano

🏠
Working from home
View GitHub Profile
@ianldgs
ianldgs / dayjs-zoned.d.ts
Last active October 6, 2022 09:21
DayJS Zoned
import { Dayjs, PluginFunc, ConfigType } from 'dayjs';
declare const plugin: PluginFunc;
export = plugin;
declare module 'dayjs' {
/** Similar to date-fns/utcToZonedTime */
function utcToZoned(config: ConfigType, timezone?: string): Dayjs;
/** Similar to date-fns/zonedTimeToUtc */
@rauchg
rauchg / index.html
Created November 27, 2019 12:07
Next level Phone UX
<!DOCTYPE html>
<html>
<head>
<title>Next level UX</title>
<meta charset="UTF-8" />
</head>
<body>
<p>
<label>
@gene1wood
gene1wood / How-to-pass-all-headers-in-CloudFront-using-CloudFormation.md
Last active February 8, 2023 20:24
How to configure CloudFront using CloudFormation to pass all headers

How to configure CloudFront using CloudFormation to pass all headers

How can you configure a CloudFront distribution to pass all headers to the origin if the CloudFront distribution is deployed using CloudFormation? If you deploy the distribution in the AWS Web Console, you can select between None, Whitelist and All. In CloudFront it appears that you can only assert a whitelist of allowed headers. This is done in this area of a CloudFormation resource describing a CloudFront distribution

Resources:
  CloudFrontDistribution:
    Type: AWS::CloudFront::Distribution
    Properties:
      DistributionConfig:
@MightyPork
MightyPork / custom-serde.rs
Created June 11, 2019 20:34
example of custom serialize and deserialize in serde
use serde::ser::SerializeMap;
use serde::{Serialize, Serializer, de::Visitor, de::MapAccess, Deserialize, Deserializer};
use std::fmt;
#[derive(Debug)]
struct Custom(String, u32);
impl Serialize for Custom {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
@JMPerez
JMPerez / netlify-zeit-domain.txt
Created May 1, 2019 05:28
Setting up DNS for Netlify to work on a Zeit domain
now dns add domain.com @ A 104.198.14.52
now dns add domain.com www CNAME domain.netlify.com
@katoozi
katoozi / google-search.sh
Created April 13, 2019 06:36
my google search script for dmenu
#!/bin/sh
browser=${BROWSER:-google-chrome-stable}
pgrep -x dmenu && exit
choice=$(echo "" | dmenu -i -p "Search Google:") || exit 1
if [ "$choice" = "" ]; then
$browser "https://google.com"
else
@Phroneris
Phroneris / howGithubMarkdownDetailsWork.md
Last active March 30, 2024 05:50
GitHubのMarkdownで折りたたみ記法の中身を整形させる方法

どうやら</summary>後の空行以降から整形される。

記述

違いは</summary>後の空行だけ。

<details>
<summary>これは中身が整形されない</summary>
1. 野菜**A**の皮を剥く。
2. 乱切りにする。
@hosseinzoda
hosseinzoda / README.md
Last active August 19, 2021 15:29
UWP BLE Gatt Server Advertising Not Supported, IsPeripheralRoleSupported = FALSE

I intend to gather a list of bluetooth internal/usb adapters that support or do not support advertising Gatt services.

These Devices may support advertising on bluetooth/ble. But the Windows 10 GattServiceProvider do support advertising on it. With this error, The device does not support the command feature. WinRT information: The Bluetooth adapter does not support peripheral role.

Test project on Vistual Studio: https://github.com/hosseinamin/UWPBleGattAdvTest

@wesbos
wesbos / facebookScrape.js
Created January 25, 2019 20:30
marketplace
require('isomorphic-fetch');
async function go(params) {
const variables = {
params: {
bqf: { callsite: 'COMMERCE_MKTPLACE_WWW', query: 'iphone' },
browse_request_params: {
// burlington
filter_location_id: '108043585884666',
// hamilton
@scheibo
scheibo / gen1ou.txt
Created December 3, 2018 02:53
Gen 1 - OU Teams
=== [gen1ou] marcoasd 2014 ===
Gengar
- Hypnosis
- Thunderbolt
- Night Shade
- Explosion
Chansey
- Ice Beam