Skip to content

Instantly share code, notes, and snippets.

@sisoe24
sisoe24 / startup_app.py
Created July 24, 2021 02:10
Nuke PySide2 startup template app that can be launched directly inside Nuke or in your environment.
# coding: utf-8
from __future__ import print_function
import sys
from PySide2.QtCore import (
Qt,
QSettings,
QCoreApplication
)
@xLight23
xLight23 / CompleteDiscordQuest.md
Last active April 27, 2024 17:18
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@pratikbutani
pratikbutani / PathUtils.java
Created September 9, 2019 05:53
Get Path from URI or URI from Path Utils.
public class PathUtils {
/**
* To get URI from Path
*
* @param context context
* @param file file
* @return Uri
*/
public static Uri getUriFromPath(Context context, File file) {
String filePath = file.getAbsolutePath();
@neilsmithdesign
neilsmithdesign / swift-ui-protocol-view-models.swift
Last active April 27, 2024 17:13
SwiftUI views with protocol interfaces to view models.
import SwiftUI
/// View model protocol
protocol ViewModel: ObservableObject {
var count: Int { get }
func increase()
}
/// Concrete implementation
class MyViewModel: ViewModel {
@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: