Skip to content

Instantly share code, notes, and snippets.

@jerieljan
jerieljan / btt-screenshot.sh
Created May 22, 2021 13:32
Screenshot OCR with BetterTouchTool on MacOS
#!/usr/bin/env bash
# Usage:
# - Install `tesseract` with `brew install tesseract`
# - In BetterTouchTool, create a trigger of your choice.
# (I recommend a Keyboard Shortcut with Cmd+Shift 6)
# - Add an Execute Shell Script / Task action
# - Paste this script.
# NOTE: You'll need to authorize BTT to the Screen Recording permission in Security and Privacy at System Preferences
@sk1010k
sk1010k / twitter-register.py
Created April 27, 2024 17:09 — forked from ceres-c/twitter-register.py
Attempt at registering Twitter accounts with Python Requests. NOT working.
#! /bin/python
import json
import random
import re
import string
import time
import urllib.parse
from threading import Thread
from time import sleep, time_ns
@ddeveloperr
ddeveloperr / Ubuntu_Keyboard_Shortcut.txt
Created November 29, 2018 21:44
Ubuntu 18.04 Keyboard Shortcut Every User Should Know
1. Super key: Opens Activities search (Windows key!)
2. Ctrl+Alt+T: Ubuntu terminal shortcut
3. Super+L or Ctrl+Alt+L: Locks the screen
4. Super+D or Ctrl+Alt+D: Show desktop
5. Super+A: Shows the application menu
6. Super+Tab or Alt+Tab: Switch between running applications
7. Super+Arrow keys: Snap windows
8. Super+M: Toggle notification tray
9. Super+Space: Change input keyboard (for multilingual setup)
@rylev
rylev / learn.md
Created March 5, 2019 10:50
How to Learn Rust

Learning Rust

The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.

Warning

Rust is not C or C++ so the way your accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.

The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.

@janikvonrotz
janikvonrotz / Configure Lets Encrypt auto renewal for certificates.md
Last active April 27, 2024 17:05
Configure Lets Encrypt auto renewal for certificates #Markdown #OpenSSL

This post is part of my Your own Virtual Private Server hosting solution project.
Get the latest version of this article here: https://gist.github.com/ddce334cd8ab21a40941.

Introduction

Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. So far it works well and makes it easy to obtain a free certificate. Now the created certificates will expire withing 90 days. This post will show you how you can auto renew these certificates before they expire.

Requirements

@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active April 27, 2024 17:02
This script for Home Assistant will fade a lamp over time with your choice of easing, including varieties of ease-in, ease-out, and ease-in-out.
alias: Ashley’s Light Fader
description: >
Fades a lamp over time. If you have any questions or comments about this
script, feel free to tweet Ashley Bischoff at @FriendlyAshley. Released under
the Apache 2.0 license. (v2.0)
fields:
light:
name: 💡 Light
description: entity_id of the lamp.
selector:
@pishangujeniya
pishangujeniya / reset-mysql-8-root-password-windows.md
Created December 5, 2019 18:04
Reset MySQL 8.0 root Password in Windows

Reset MySQL 8.0 root Password in Windows

  1. Stop the MySQL 8.0service from services
  2. Go to path C:\Program Files\MySQL\MySQL Server 8.0\bin and open cmd
  3. Run mysqld --console --skip-grant-tables --shared-memory
  4. Open new cmd in the same path
  5. Run following commands
  6. mysql -u root
  7. select authentication_string,host from mysql.user where user='root';
  8. UPDATE mysql.user SET authentication_string='' WHERE user='root';
@reginadiana
reginadiana / README-TEMPLATE.md
Last active April 27, 2024 17:01
Template sugestivo para documentação de projetos

Titulo ou Arte do Projeto

@fortuna
fortuna / Queries.md
Last active April 27, 2024 17:00
Grafana dashboard for Outline Servers

Example Queries

1h active keys by location:

sum(max(increase(shadowsocks_data_bytes{access_key!=""} [1h])) by (access_key, location) > bool 0) by (location)

1h usage by location:

sum(increase(shadowsocks_data_bytes{dir=~"c<p|p>t"} [1h])) by (location)
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 27, 2024 17:00
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