Skip to content

Instantly share code, notes, and snippets.

View a-eid's full-sized avatar
🎯
Focusing

Ahmed Eid a-eid

🎯
Focusing
View GitHub Profile
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
# Set new panes to open in current directory
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
# Set new panes to open in current directory
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
import {useComputed, Signal} from '@preact/signals-react'
import {ReactNode} from 'react'
type SignalConsumerProps<Signal, Selection> = {
signal: Signal
children: (value: Selection) => ReactNode
selector: (s: Signal) => Selection
}
export function ComputedSignalConsumer<Signal, Selection>({
import { createContext, forwardRef, useCallback, useMemo } from "react";
import { FlatList, FlatListProps, ViewToken } from "react-native";
import Animated, { useSharedValue } from "react-native-reanimated";
const MAX_VIEWABLE_ITEMS = 4;
type ViewabilityItemsContextType = string[];
export const ViewabilityItemsContext = createContext<
Animated.SharedValue<ViewabilityItemsContextType>
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
# Set new panes to open in current directory
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
import * as React from 'react';
import { StyleSheet } from 'react-native';
import { gestureHandlerRootHOC, TouchableWithoutFeedback } from 'react-native-gesture-handler';
import A, { useAnimatedProps, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
import { colors, container, screenWidth } from 'src/theme';
import { Box } from '../Box';
import { Text } from '../Text';
alias venv="python -m venv venv && . venv/bin/activate && pip install --upgrade pip setuptools > /dev/null"
// follow the update min nights format.
method: 'PUT',
uri: `https://api.airbnb.com/v2/calendars/${id}/${date}`,
format: 'host_calendar',
body: {
daily_price: price,
demand_based_pricing_overridden: true,
availability: 'available'
},
fetch("https://www.airbnb.com/api/v2/calendar_rules/id?key=key&_intents=mys_update_calendar_rules&_format=use_miso_default", {
method: "PUT",
headers: {
accept: "application/json",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/json",
'X-Airbnb-OAuth-Token': token
},
referrer: "https://www.airbnb.com/manage-your-space/41040547/availability/trip-length",
import fetch from "node-fetch"
// expected to return => {token: "", filledAccountData: {authMethod: "EMAIL_AND_PASSWORD", userId: ""}}
export async function login(email, password, deviceId) {
return await fetch("https://api.airbnb.com/v2/authentications?client_id=3092nxybyb0otqw18e8nh5nty&locale=en-GB&currency=GBP", {
body: JSON.stringify({
authenticationParams: { email: { email, password } },
}),
headers: {
"Content-Type": "application/json; charset=UTF-8",