Skip to content

Instantly share code, notes, and snippets.

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

Eyal Cohen eyalcohen4

🏠
Working from home
View GitHub Profile
@eyalcohen4
eyalcohen4 / SignIn.tsx
Created November 24, 2023 17:23
Sign In Button
"use client"
import { Button } from "./ui/button"
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
from telegram import Bot, Update
from telegram.ext import Updater, MessageHandler, Filters, CommandHandler
import boto3
import logging
# Enable logging
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
# AWS configurations
AWS_ACCESS_KEY = 'YOUR_AWS_ACCESS_KEY'
@eyalcohen4
eyalcohen4 / App.js
Last active May 23, 2021 18:35
Initial react native App.js
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>Hello World</Text>
</View>
);
}
import { RtcTokenBuilder, RtcRole } from 'agora-access-token';
const APP_ID = '';
const APP_CERTIFICATE = '';
export const generateRoomToken = async ({ roomKey, userUid, role, }) => {
if (!roomKey) {
throw new Error('no room name');
}
if (typeof userUid === 'string') {
userUid = parseInt(userUid);
@eyalcohen4
eyalcohen4 / README.md
Last active June 14, 2020 15:00
React TypeScript Component Snippet

Instructions

  • Go to VSCode, click CMD+Shift+P
  • Enter: Preferences: Configure User Snippets
  • Choose typescriptreact.json
  • Copy the "ReactComponent" property from the typescriptreact.json file to your clipboard
  • Paste
  • Enjoy
import React from 'react'
function Pokemons() {
}
export default Pokemons
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
import axios from 'axios';
class FootballAPI {
constructor() {
this.BASE_URL = 'http://api.football-data.org/v1';
this.API_KEY = process.env.REACT_APP_FOOTBALL_API_KEY;
this.http = axios;
}
sendRequest(method, url, data, headers) {
(() => {
var json = [
{
id: "62-0VE218914258759",
name: "Versace 0VE2194",
price: 373,
final_price: 224,
img_front:
"https://static.glassesusa.com/media/catalog/product/8/0/8053672851298_f_1.jpg",
img_angle:
cmake_minimum_required(VERSION 3.10)
project(obs_headless_poc)
set(obs_include_dir ${CMAKE_CURRENT_SOURCE_DIR}/obs-studio/libobs/)
set(obs_lib_dir ${CMAKE_CURRENT_SOURCE_DIR}/obs-studio/build/libobs/)
include_directories(/home/myplay/dev/obs-headless-poc/obs-studio/libobs)
link_directories(/home/myplay/dev/obs-headless-poc/obs-studio/build/libobs)