Skip to content

Instantly share code, notes, and snippets.

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

Denys Dovzhenko DenisDov

🏠
Working from home
View GitHub Profile
@trvswgnr
trvswgnr / compress_video
Last active February 5, 2025 20:37
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file>"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
}
get_extension() {
f="${1##*/}"
case "$f" in
@JaysonChiang
JaysonChiang / api.ts
Last active March 10, 2025 21:50
Example of Axios with TypeScript
import axios, { AxiosError, AxiosResponse } from 'axios';
import token from './somewhere';
interface Todo {
id: string;
title: string;
}
interface User {
id: string;
@eveningkid
eveningkid / react-native-animated_twitter-profile.jsx
Last active January 4, 2025 14:36
React Native Animated: Twitter Profile Example
// Expo SDK41
// expo-blur: ~9.0.3
import React, { useRef } from 'react';
import {
Animated,
Image,
ImageBackground,
ScrollView,
StatusBar,
@whoisryosuke
whoisryosuke / markdown-directory-tree.md
Created July 27, 2020 21:03
Markdown / Documentation - Generate Markdown-friendly directory / folder tree structure - @see: https://stackoverflow.com/a/23990108
  1. Install the Linux package tree using Homebrew: brew install tree
  2. Run the tree command on any directory to generate a Markdown friendly structure: tree your-directory

You can save it to a file by piping the results into a text file: tree . >> directory-structure.md

Example

packages/button
├── lib
import useFetch from "useFetch";
const { response, isLoading } = useFetch({
api: identityApi,
url: AUTH_MEMBER_TRANSACTIONS(requestOptions),
config: JSON.stringify({ requireAuthentication: true }),
});
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active March 15, 2025 21:34
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

platform :ios, '9.1'
abstract_target 'Foo' do
# RN related
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'RCTAnimation',
'RCTBlob',
'RCTText',
@AmreeshTyagi
AmreeshTyagi / workbench-ui-fix.sh
Last active October 16, 2024 06:21
Exclude MySQL Workbench from dark theme with mojave Mac dark theme
#!/bin/bash
defaults write com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool yes
echo "Successfully patched!"
echo "Now restart MySQL Workbench to see the Workbench in light theme."
#Restart MySQL Workbench after executing this.
@neretin-trike
neretin-trike / pug.md
Last active March 11, 2025 12:01
Туториал по HTML препроцессору Pug (Jade)
@ghosh
ghosh / micromodal.css
Last active February 23, 2025 16:34
Demo modal styles for micromodal.js and corresponding expected html. If using this, set the `awaitCloseAnimation` in config to true
/**************************\
Basic Modal Styles
\**************************/
.modal {
font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;
}
.modal__overlay {
position: fixed;