Skip to content

Instantly share code, notes, and snippets.

View aybasaran's full-sized avatar
🎯
Focusing

Ahmet Yusuf Başaran aybasaran

🎯
Focusing
View GitHub Profile
@nivethan-me
nivethan-me / README.md
Last active May 21, 2024 10:56
Setup a Next.js 13 project with Eslint + Prettier with automatic tailwind class sorting
@docPhil99
docPhil99 / opencv_qt_label.md
Last active April 13, 2024 15:48
How to display opencv video in pyqt apps

The code for this tutorial is here

Opencv provides are useful, but limited, method of building a GUI. A much more complete system could be acheived using pyqt. The question is, how do we display images. There are quite a few possible routes but perhaps the easiest is to use QLabel since it has a setPixmap function. Below is some code that creates two labels. It then creates a grey pixmap and displays it one of the labels. code: staticLabel1.py

from PyQt5.QtWidgets import QWidget, QApplication, QLabel, QVBoxLayout
from PyQt5.QtGui import QPixmap, QColor
import sys
@kwmt
kwmt / AppDelegate.swift
Created October 5, 2019 17:13
how to googlemaps view on swiftui
import UIKit
import GoogleMaps
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// https://developers.google.com/maps/documentation/ios-sdk/get-api-key#add_key
GMSServices.provideAPIKey("YOUR_API_KEY")
return true
}
@leodutra
leodutra / -setup-windows-wsl-devenv.md
Last active July 5, 2024 19:15
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist

Preview

Requirements

@karlhadwen
karlhadwen / cloudSettings
Last active December 6, 2022 09:03
VSCode Settings
{"lastUpload":"2020-12-31T16:16:14.406Z","extensionVersion":"v3.4.3"}
PLEASE NOTE:
- We DO NOT recommend using the `Etc` timezones. Please select a real time region from the list, for example a country or city.
- Time region names are case sensitive
- Time regions don't contain spaces. The brackets at the end are for reference, and aren't a part of the name
Etc/GMT+12 (GMT -12)
Etc/GMT+11 (GMT -11)
Pacific/Midway (GMT -11)
Pacific/Niue (GMT -11)
Pacific/Pago_Pago (GMT -11)
@imfing
imfing / wsl-setup.md
Last active September 15, 2023 01:55
WSL + ZSH + Hyper Setup

My WSL Setup

A guide to setup your WSL with Hyper and zsh

Download & Install the WSL

  • Follow the very thorough instructions here

Get a prettier terminal

  • Download Hyper.js here - I went with the 'hyperblue' theme.
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git
@pmkay
pmkay / top-brew-packages.txt
Last active June 27, 2024 12:16 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles
@muralikg
muralikg / background.js
Last active June 8, 2023 09:19
puppeteer screen capture demo. Currently records 10 second video. Change the timeout in background.js with your own logic to stop the recording when necessary. Try with `node export.js`
/* global chrome, MediaRecorder, FileReader */
chrome.runtime.onConnect.addListener(port => {
let recorder = null
port.onMessage.addListener(msg => {
console.log(msg);
switch (msg.type) {
case 'REC_STOP':
console.log('Stopping recording')
if (!port.recorderPlaying || !recorder) {