Enjoy ! 😄
Download iTerm2 here.
| import * as React from 'react'; | |
| const useIsFirstRender = (): boolean => { | |
| const isFirst = React.useRef(true); | |
| if (isFirst.current) { | |
| isFirst.current = false; | |
| return true; | |
| } else { |
| import { useState, useCallback, useRef } from 'react'; | |
| export const useSynchronousReducer = <S, A>( | |
| reducer: (s: S, a: A) => S, | |
| initialState: S | |
| ) => { | |
| const stateRef = useRef(initialState); | |
| const [state, setState] = useState<S>(stateRef.current); | |
| const dispatch = useCallback<(a: A) => S>((action) => { |
| #!/bin/bash | |
| input="input.mp4" | |
| output="output.mp4" | |
| color="black" | |
| while getopts ":i:o:w:h:c:" opt; do | |
| case $opt in | |
| i) input="$OPTARG" | |
| ;; |
| import { IgApiClient } from 'instagram-private-api'; | |
| import * as dotenv from 'dotenv'; | |
| import {AccountFollowersFeedResponseUsersItem} from "instagram-private-api/dist/responses"; | |
| dotenv.config({ path: __dirname+'/.env' }); | |
| const username = process.env.IG_USERNAME as string; | |
| const password = process.env.IG_PASSWORD as string; | |
| const INTERVAL_BETWEEN_CHECKS = 15000; // in ms |
| <html> | |
| <head> | |
| <style> | |
| .fade { | |
| display: block; | |
| background: red; | |
| margin-bottom: 50px; | |
| width: 100%; | |
| height: 150px; | |
| opacity: 0.2; |
| """ | |
| Example using the transport directly. | |
| """ | |
| import json | |
| from httpcore_uds import AsyncUDSTransport | |
| async def main() -> None: | |
| """ |
| if (!String.prototype.endsWith) { | |
| Object.defineProperty(String.prototype, 'endsWith', { | |
| value: function (searchString, position) { | |
| var subjectString = this.toString(); | |
| if (position === undefined || position > subjectString.length) { | |
| position = subjectString.length; | |
| } | |
| position -= searchString.length; | |
| var lastIndex = subjectString.indexOf(searchString, position); | |
| return lastIndex !== -1 && lastIndex === position; |
Enjoy ! 😄
Download iTerm2 here.