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:
- Accept the quest under User Settings -> Gift Inventory
# coding: utf-8 | |
from __future__ import print_function | |
import sys | |
from PySide2.QtCore import ( | |
Qt, | |
QSettings, | |
QCoreApplication | |
) |
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(); |
import SwiftUI | |
/// View model protocol | |
protocol ViewModel: ObservableObject { | |
var count: Int { get } | |
func increase() | |
} | |
/// Concrete implementation | |
class MyViewModel: ViewModel { |
#!/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 |
#! /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 |
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) |
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.
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.
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.
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: |