Skip to content

Instantly share code, notes, and snippets.

@kirides
kirides / build-mpv_silicon.sh
Created February 28, 2023 19:53 — forked from dbrookman/build-mpv_silicon.sh
How to build mpv & mpv.app on an Apple silicon (M1 / M2) Mac
#!/usr/bin/env bash
# builds mpv & mpv.app on Apple silicon (M1 / M2) Macs
# run this script from the root directory of the mpv repo
# if anything fails, gtfo
set -ex
meson setup build
meson compile -C build
@smartdev10
smartdev10 / CreateBrowser.js
Created July 28, 2020 23:30
puppeteer-extra exemple
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
const AdblockerPlugin = require('puppeteer-extra-plugin-adblocker');
(async() => {
puppeteer.use(AdblockerPlugin({ blockTrackers: true }));
puppeteer.use(StealthPlugin());
puppeteer.use(require('puppeteer-extra-plugin-anonymize-ua')())
puppeteer.use(require('puppeteer-extra-plugin-user-preferences')({userPrefs: {
private fun signin() {
lifecycleScope.launch(errorHandler { signup() }) {
val result = oneTapClient.suspendBeginSignInRequest(buildSignInRequest())
loginResult.launch(
IntentSenderRequest.Builder(result.pendingIntent)
.build()
)
}
}

Merging Rubygems and Bundler

1.sh:

#!/bin/sh
set -eux
rm -rf rubygems bundler
git clone https://github.com/rubygems/rubygems
git clone https://github.com/rubygems/bundler
@orta
orta / TODO.md
Last active October 26, 2020 08:48
Guided Tour of the TS website
@bradtraversy
bradtraversy / django_crash_course.MD
Last active November 16, 2024 08:39
Commands for Django 2.x Crash Course

Django Crash Course Commands

# Install pipenv
pip install pipenv
# Create Venv
pipenv shell
@tsathis
tsathis / IntLinkedList.cpp
Last active May 30, 2018 13:49
Integer Linked List using C++ from Scratch
#include <iostream>
//Node class
class Node {
private:
//private members
int data;
Node *next;
public:
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 11, 2025 21:19
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@wojteklu
wojteklu / clean_code.md
Last active April 11, 2025 10:13
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}