Skip to content

Instantly share code, notes, and snippets.

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

Ken Fukuyama kenfdev

🏠
Working from home
View GitHub Profile
@kenfdev
kenfdev / snippets.md
Created October 25, 2021 23:55
React Native

React Native

Switchの色を変える

<Switch
  value={isGlutenFree}
  trackColor={{ true: Colors.primary }}
  onValueChange={(newValue) => setIsGlutenFree(newValue)}
/>
@kenfdev
kenfdev / apigateway.md
Last active December 20, 2021 05:08
AWS
@kenfdev
kenfdev / array_of_keys_of_type.ts
Last active November 2, 2021 01:45
JavaScript(TypeScript)
type Member = {
id: string;
firstName: string;
lastName: string;
age: number;
salary: number;
};
for (const field of ['firstName', 'lastName', 'age', 'salary'] as Array<
keyof Member

Auth0でユーザー名でのログインを可能にする

Created: 2021-08-31 18:02

Image

Requires Usernameをオンにする

Disable Signupもつけとく Image

@kenfdev
kenfdev / snippets.md
Last active November 24, 2021 06:31
Oso

Oso Snippets

Create Data Filter Oso Inmemory(not sql)

export async function createInmemoryDataFilterOso() {
  const constrain = (predicates: any[], filter: Filter) => {
    switch (filter.kind) {
      case 'Eq':
        predicates.push(
@kenfdev
kenfdev / dotnet.md
Last active November 24, 2021 07:03
CDK
@kenfdev
kenfdev / tips.md
Last active January 7, 2022 01:24
Teams

Tips for Teams

Clear Teams Cache on Mac

Whenever you feel something isn't working as expected, clear the cache.

  1. Quit out of Teams completely.
  2. Navigate to ~/Library/Application Support/Microsoft.
  3. Right-click the Teams folder then select Move to Trash.
  4. Navigate to Keychain Access.
@kenfdev
kenfdev / gist:fcdb32250350c109df6d4f989c86d4de
Created July 2, 2025 03:02
Claude Code Notificaton to Slack Webhook
#!/bin/bash
# Enhanced notify-slack.sh that handles both Notification and Stop hooks
# Replace YOUR_WEBHOOK_URL with your actual Slack webhook URL
# Slack Webhook URL (replace with your actual URL)
WEBHOOK_URL="YOUR/WEBHOOK/URL"
# Check if webhook URL has been updated
if [[ "$WEBHOOK_URL" == *"YOUR/WEBHOOK/URL"* ]]; then
@kenfdev
kenfdev / append_ultrathink.sh
Created August 15, 2025 21:37
Claude Code hooks to simply add options to improve your prompt
#!/bin/bash
# Simple hook to process trailing options
input=$(cat)
# Check if there are options at the end of prompt
if echo "$input" | grep -q '"prompt".*-[a-z]\+"'; then
# Extract just the options part (e.g., "-uj" -> "uj")
options=$(echo "$input" | grep -o '\-[a-z]\+"' | tail -1 | sed 's/-//' | sed 's/"//')